Skip to content

Commit 1363100

Browse files
committed
new google map api
1 parent f0cbbd8 commit 1363100

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

template-adventures-single.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,20 @@
2525
$title_string = trim($title_string);
2626
$locations = explode(' to ', $title_string);
2727
require(locate_template('breadcrumb.php'));
28+
29+
$map_url = 'https://www.google.com/maps/embed/v1/directions';
30+
31+
$map_url .= '?origin='.trim($locations[0]);
32+
$map_url .= '&destination='.trim($locations[1]);
33+
$map_url .= '&mode=walking';
34+
35+
2836
?>
2937
<div class="container">
3038
<div class="col-sm-12 col-md-12 col-lg-12">
31-
<iframe width="100%" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="//maps.google.co.uk/maps?f=q&amp;source=s_q&amp;hl=en&amp;q=<?php echo $title_string?>&amp;saddr=<?php echo trim($locations[0])?>&amp;daddr=<?php echo trim($locations[1])?>&amp;ie=UTF8&amp;t=m&amp;z=8&amp;output=embed"></iframe>
39+
40+
41+
<iframe width="100%" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="<?=$map_url?>"></iframe>
3242
<?php
3343
if ($values = get_post_custom_values('leadvideo')) {
3444
echo '<iframe width="100%" height="400" src="//www.youtube.com/embed/';

0 commit comments

Comments
 (0)