[Plugin: Pronamic Google Maps] Show two maps on one page
-
I want to show TWO maps of the same location (lat/long) on a single Post, one map as satellite, and the other as a regular/roadmap map. And i’m doing this in the Sidebar.
I know i could easily show one map and let the user just use the UI to change the map type, but that is not what my client wants. He wants to show both types at once on the page.
I can get two maps to display correctly by adding this code twice, in my post template file:
if(function_exists('pronamic_google_maps')) { pronamic_google_maps(array( 'width' => 290 , 'height' => 200 )); }
But it does NOT seem to take the parameter:
'map_type_id' => 'satellite'
(or the value for a regular map, which i had to find in the google api docs):
'map_type_id' => 'roadmap'
which the “pronamic_google_maps_mashup” function takes.So i tried using two instances of “pronamic_google_maps_mashup” in my template instead, so i could specify different map_type_id for each. This part basically worked, but the maps otherwise do NOT work:
1) the satellite map starts far too zoomed in (maximum i think). How can i set the initial zoom level? It is NOT using the zoom level of the UI map on my wp-admin edit-post page.
2) the roadmap map does not show the actual map, it only shows the map UI (marker, zoom buttons, map type buttons), over a grey background.
- The topic ‘[Plugin: Pronamic Google Maps] Show two maps on one page’ is closed to new replies.