gluethje
Member
Posted 11 months ago #
I am having this issue:
I want the map so be static so it doesn't mees up scrolling on the page. If map is dynamic and the cursor is inside the map and you scroll, it scrolls the map and not the page, which can get annoying, especially on small screens.
But the static map is, well, static. It would be great to be able to generate a link to the map on google.com if the visitor want to scroll, get directions etc. How would I go about this?
http://wordpress.org/extend/plugins/pronamic-google-maps/
Tibor Paulsch
Member
Posted 7 months ago #
You could use the post meta field _pronamic_google_maps_address and add that to a link to google maps.
I guess you would need something like this in your template somewhere:
printf ( '<a href="http://maps.google.com/maps/?q=%s">link to map</a>', get_post_meta($post->ID, '_pronamic_google_maps_address' ) );
aswartzell
Member
Posted 1 month ago #
wonderful idea, gluethje. one little tweak to tibor's code (pass true to the get_post_meta function) and we're good to go:
<?php printf ( '<a href="http://maps.google.com/maps/?q=%s">View in Google Maps</a>', get_post_meta($post->ID, '_pronamic_google_maps_address' , true ) ); ?>