WordPress.org

Ready to get started?Download WordPress

Forums

Pronamic Google Maps
[resolved] Get link to map on maps.google.com (4 posts)

  1. gluethje
    Member
    Posted 1 year 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/

  2. Tibor Paulsch
    Member
    Posted 1 year 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' ) );
  3. aswartzell
    Member
    Posted 12 months 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 ) ); ?>

  4. Remco Tolsma
    Member
    Plugin Author

    Posted 11 months ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic