Meta Box
Support Forum
Support › Meta Box Geolocation › How to set default map bounds on OSM field?Resolved
Is there currently a built-in way to set the map bounds of an Open Street Map field?
Presently, it defaults to Dublin, Ireland @ 53.346881,-6.258860.
For now, I just changed Line 35 in my local meta-box/js/osm.js to use coordinates closer to my clients, so they don't get confused when they see Dublin. https://github.com/wpmetabox/meta-box/blob/master/js/osm.js#L35
meta-box/js/osm.js
No big deal, just curious. Thanks
Hi,
You can set the default location via std parameter, like this:
std
'std' => '53.346881,-6.258860'
By passing a pair of latitude, longitude, you can set the default location of the map.