How to set default map bounds on OSM field?

Support MB Geolocation How to set default map bounds on OSM field?Resolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #14598
    brandonjpbrandonjp
    Participant

    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.
    osm dublin

    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

    No big deal, just curious.
    Thanks

    #14600
    Anh TranAnh Tran
    Keymaster

    Hi,

    You can set the default location via std parameter, like this:

    'std' => '53.346881,-6.258860'

    By passing a pair of latitude, longitude, you can set the default location of the map.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.