Reply To: Open Map in popup lightbox style

Home Forums Reply To: Open Map in popup lightbox style



This isn’t something the plugin does currently, so I’m going to move your post to the ‘feature requests’ section.

It seems to me it’d be more useful to have a ‘bigger map’ link that makes the map bigger in the page, rather than opening it in a popup. Would that work for you?

I created a sample javascript to do this but I can’t say if it’ll work for you. I’ll try to include this as a plugin feature in the next release so it’ll be easy to do.

Until then, you can give this a shot. You can put the javascript function in your theme or directly in the post (using the HTML editor).  The link can go before or after your shortcode to display the map.

[mappress poilist="true"]

<a onclick="bigMap(); return false;" href="#" rel="nofollow">Bigger Map</a>
<script type="text/javascript">
function bigMap() {  
  var m=document.getElementById('mapp0');  // Map's canvas div element  
  var p=m.parentNode;   // Map's parent container div = = '100%'; = = '800px';  
  mapp0.resize();  // Tell the Google map to resize itself to fit }

‘mapp0′ is the name you assigned the map using the shortcode parameter [mappress mapname=’mymap’].  If you haven’t set a name the plugin will use ‘mapp0’ for the first map on the page, ‘mapp1’ for the second, and so on.

I hope that helps!