/ Published in: PHP
Use this code in a WordPress template with the Geo Mashup plugin (see URL) to include a global map within a post or page, centered on that post or page's location, with marker highlighted.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// Try only if Geo Mashup plugin is active $current_location = GeoMashupDB::get_post_location( get_the_ID() ); if ( $current_location ) { // The current post has a location, so include the map 'map_content' => 'global', 'center_lat' => $current_location->lat, 'center_lng' => $current_location->lng, 'marker_select_info_window' => 'false', 'marker_select_highlight' => 'true', 'marker_select_center' => 'true', 'auto_info_open' => 'true', 'open_object_id' => $current_location->object_id ); echo GeoMashup::map( $map_arguments ); } }
URL: http://code.google.com/p/wordpress-geo-mashup