stephenc
06-10-2010, 04:39 PM
I'm really struggling to try to find the code to embed 2 links onto a website page which initially will display a map, eg of the UK. Once either of the 2 links are clicked, it will then draw out the directions on the map on the SAME website page map
This may sound a big vague but what I'm trying to achieve is a list of links (routes eg) down the left side of the page and when clicked the map on the SAME page shows the directions
If someone can do get this working, would you mind posting the complete HTML code please, or at least the opening and closing BODY tags so that I can duplicate it
Ideally, the map would be placed on a DIV on the page but anything that gets both the links AND the map on the same page will be greatly appreciated
Thanks, Stephen (map code follows)
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.uk/maps?f=d&source=s_d&saddr=london&daddr=Edinburgh&hl=en-GB&geocode=FXjUEQMd5BL-_yl13iGvC6DYRzGZKtXdWjqWUg%3BFWC7VQMdsFzP_ykjJpilALiHSDEnF-d8exTyZA&mra=ls&sll=54.59076,-5.932046&sspn=0.007373,0.019205&ie=UTF8&ll=53.723355,-1.911875&spn=4.45365,3.57127&output=embed"></iframe><br /><small><a href="http://maps.google.co.uk/maps?f=d&source=embed&saddr=london&daddr=Edinburgh&hl=en-GB&geocode=FXjUEQMd5BL-_yl13iGvC6DYRzGZKtXdWjqWUg%3BFWC7VQMdsFzP_ykjJpilALiHSDEnF-d8exTyZA&mra=ls&sll=54.59076,-5.932046&sspn=0.007373,0.019205&ie=UTF8&ll=53.723355,-1.911875&spn=4.45365,3.57127" style="color:#0000FF;text-align:left">View Larger Map</a></small>
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.uk/maps?f=d&source=s_d&saddr=london&daddr=glasgow&geocode=FXjUEQMd5BL-_yl13iGvC6DYRzGZKtXdWjqWUg%3BFRtxVAMdOQq__ynrzlYgVhWISDEeUe8FuIPmcQ&hl=en-GB&mra=ls&sll=53.29491,-3.031005&sspn=3.89394,9.832764&ie=UTF8&ll=53.685225,-2.195995&spn=4.37739,4.13951&output=embed"></iframe><br /><small><a href="http://maps.google.co.uk/maps?f=d&source=embed&saddr=london&daddr=glasgow&geocode=FXjUEQMd5BL-_yl13iGvC6DYRzGZKtXdWjqWUg%3BFRtxVAMdOQq__ynrzlYgVhWISDEeUe8FuIPmcQ&hl=en-GB&mra=ls&sll=53.29491,-3.031005&sspn=3.89394,9.832764&ie=UTF8&ll=53.685225,-2.195995&spn=4.37739,4.13951" style="color:#0000FF;text-align:left">View Larger Map</a></small>
This may sound a big vague but what I'm trying to achieve is a list of links (routes eg) down the left side of the page and when clicked the map on the SAME page shows the directions
If someone can do get this working, would you mind posting the complete HTML code please, or at least the opening and closing BODY tags so that I can duplicate it
Ideally, the map would be placed on a DIV on the page but anything that gets both the links AND the map on the same page will be greatly appreciated
Thanks, Stephen (map code follows)
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.uk/maps?f=d&source=s_d&saddr=london&daddr=Edinburgh&hl=en-GB&geocode=FXjUEQMd5BL-_yl13iGvC6DYRzGZKtXdWjqWUg%3BFWC7VQMdsFzP_ykjJpilALiHSDEnF-d8exTyZA&mra=ls&sll=54.59076,-5.932046&sspn=0.007373,0.019205&ie=UTF8&ll=53.723355,-1.911875&spn=4.45365,3.57127&output=embed"></iframe><br /><small><a href="http://maps.google.co.uk/maps?f=d&source=embed&saddr=london&daddr=Edinburgh&hl=en-GB&geocode=FXjUEQMd5BL-_yl13iGvC6DYRzGZKtXdWjqWUg%3BFWC7VQMdsFzP_ykjJpilALiHSDEnF-d8exTyZA&mra=ls&sll=54.59076,-5.932046&sspn=0.007373,0.019205&ie=UTF8&ll=53.723355,-1.911875&spn=4.45365,3.57127" style="color:#0000FF;text-align:left">View Larger Map</a></small>
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.uk/maps?f=d&source=s_d&saddr=london&daddr=glasgow&geocode=FXjUEQMd5BL-_yl13iGvC6DYRzGZKtXdWjqWUg%3BFRtxVAMdOQq__ynrzlYgVhWISDEeUe8FuIPmcQ&hl=en-GB&mra=ls&sll=53.29491,-3.031005&sspn=3.89394,9.832764&ie=UTF8&ll=53.685225,-2.195995&spn=4.37739,4.13951&output=embed"></iframe><br /><small><a href="http://maps.google.co.uk/maps?f=d&source=embed&saddr=london&daddr=glasgow&geocode=FXjUEQMd5BL-_yl13iGvC6DYRzGZKtXdWjqWUg%3BFRtxVAMdOQq__ynrzlYgVhWISDEeUe8FuIPmcQ&hl=en-GB&mra=ls&sll=53.29491,-3.031005&sspn=3.89394,9.832764&ie=UTF8&ll=53.685225,-2.195995&spn=4.37739,4.13951" style="color:#0000FF;text-align:left">View Larger Map</a></small>