WordPress.org

Support

Support » Plugins and Hacks » MapPress Easy Google Maps » [Resolved] [Plugin: MapPress Easy Google Maps] Adding links to map popups? – BasicGoogleMapsPlacemarks

[Resolved] [Plugin: MapPress Easy Google Maps] Adding links to map popups? – BasicGoogleMapsPlacemarks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author chrisvrichardson

    @chrisvrichardson

    Hi,

    Please post to the MapPress forums and I’ll try to help you out:
    http://wphostreviews.com/forums

    consumedesign

    @consumedesign

    Thanks, just did a hack to the plug in… wish it was an option to add a link or not but this will work for what I need to do.

    Added to core.php:

    $placemarks[] = array(
    						'title'		=> $pp->post_title,
    						'latitude'	=> get_post_meta( $pp->ID, self::PREFIX . 'latitude', true ),
    						'longitude'	=> get_post_meta( $pp->ID, self::PREFIX . 'longitude', true ),
    						'details'	=> nl2br( $pp->post_content ),
    						'permalink'	=> get_permalink( $pp->ID ),
    						'icon'		=> is_array($icon) ? $icon[0] : plugins_url( 'images/default-marker.png', __FILE__ ),
    						'zIndex'	=> get_post_meta( $pp->ID, self::PREFIX . 'zIndex', true ),
    					);

    Then you can pull it back out in the functions.js with:
    line 116:

    createMarker : function( map, title, permalink, latitude, longitude, details, icon, zIndex )

    line 101:

    bgmp.createMarker( map, bgmpData.markers[m]['title'], bgmpData.markers[m]['permalink'], parseFloat( bgmpData.markers[m]['latitude'] ), parseFloat( bgmpData.markers[m]['longitude'] ), bgmpData.markers[m]['details'], bgmpData.markers[m]['icon'], parseInt( bgmpData.markers[m]['zIndex'] ) );

    I’m using it on a rel then with jQuery so I have in line 147:

    infowindowcontent = '<div class="bgmp_placemark" rel="'+ permalink +'"> <h1>'+ title +'</h1> <div>'+ details +'</div> </div>';

    consumedesign

    @consumedesign

    Opps this is for Basic Google Maps Placemarks, not sure why it posted on MapPress Easy Google Maps?

    mmmh.. unfortunately… I canĀ“t get the link work.

    I inserted in my functions.js

    infowindowcontent = '<div class="bgmp_placemark" rel="'+ permalink +'"> <h3>'+ title +'</h3> <div>'+ details +'</div>

    but no link (and if I use I get the URL of the current site – can s.o. help me to get the markers linked directly to the detailed placemarks site!

    thanky!

    Oh you have to use jquery to allow the click->page… like:

    $('.bgmp_placemark').live('click', function() {
    	window.location = $(this).attr('rel');
    });

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] [Plugin: MapPress Easy Google Maps] Adding links to map popups? – BasicGoogleMapsPlacemarks’ is closed to new replies.
Skip to toolbar