Custom Fields
Support Meta Box Geolocation How to set default map bounds on OSM field?

  • Creator
  • #14598
    Resolved brandonjp

    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.

    No big deal, just curious.

Viewing 1 replies (of 1 total)
  • Author
  • #14600
    Anh Tran


    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 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
grid gear info copy caret-up caret-down trash