Reply To: Load map centered around a users location

Home Forums Feature Requests Load map centered around a users location Reply To: Load map centered around a users location

#14123
Chris
Keymaster

Hi,

If you map is named ‘mapp0’ then this code will get the Google Map object for the map:

var gmap = mapp0.getMap();

With that object you can use any API functions. For example:

gmap.setCenter(new google.maps.LatLng(0,0));

The plugin will assign names to the maps as they are rendered (mapp0, mapp1…etc). You can also use the ‘name’ attribute of the shortcode to set your own name.

I hope that helps!