ACF OpenStreetMap Field


Hazzle free OpenStreetMap with ACF.


In the Fieldgroup editor:

Return Format:

  • Raw data will return an array holding the field configuration.

  • Leaflet JS will return a fully functional leaflet map. Just include <?php the_field('my_field_name'); ?> in your Theme.
    You can choose from a long list of map styles and it supports multiple markers.

  • iFrame ( Will return an iFrame HTML. Only four map styles are supported
    – the ones you find on OpenStreetMap – and not more than one marker.

Map Appearance: Pan and zoom on the map and select from the Map layers to set the initial map position and style in the editor.

Map Position: If you’re more like a numbers person here you can enter numeric values for the map position.

Allow layer selection: Allow the editors to select which map layers to show up in the frontend.

Height: Map height in the frontend and editor.

Max. number of Markers
No value: infinite markers
0: No markers
Any other value: Maximum number of markers. If the return format is iFrame there can ony be one marker.


Please head over to the source code on Github.



  • ACF Field Group Editor
  • Editing the Field Value
  • Display in the Frontend
  • Settings page. Configure API access keys and disable specific tile layers.


Follow the standard WordPress plugin installation procedere.


I found a bug. Where should I post it?

Please use the issues section in the GitHub-Repository.

I will most likely not maintain the forum support forum on Anyway, other users might have an answer for you, so it’s worth a shot.

I’d like to suggest a feature. Where should I post it?

Please post an issue in the GitHub-Repository

I am a map tile provider. Please don’t include our service in your plugin.

The provisers list is taken from Leaflet providers, so requests for an unlisting should go there first.

If you want your service to remain in Leaflet Providers, you can Post an issue in the plugin’s GitHub-Repository.
Please provide me some way for me to verify, that you are acting on behalf of the Tile service provider your want to exclude.
(E.g. the providers website has a link to your github account.)

Im getting these “Insecure Content” Warnings

Some providers – like OpenPtMap or MtbMap – do not support https. If these warning bother you, choose a different one.

Why isn’t the map loading?

There is very likely an issue with the map tiles provider you’ve choosen. Some of them might be down or have suspended their service. Choose another one.

I need to do some fancy JS magic with my map.

Check out the GitHub wiki. Some of the js events might come in handy for you.
For Documentation of the map object, please refer to LeafletJS.

Will you anwser support requests via emails?



December 9, 2019
Good idea. Thanks to Google's API change, using Google Maps now exposes people to API billing. I was fearful that this would not understand the data format, or that I would destroy my field data from the Google Maps field. It's true that OpenStreetMaps simply doesn't find the premises locations as well as Google Maps does. That means it does not understand the "address" field already stored. But the fact it sees the "lat" and "lon" made a straight switchover pain-free. Thank-you.
Read all 5 reviews

Contributors & Developers

“ACF OpenStreetMap Field” is open source software. The following people have contributed to this plugin.


“ACF OpenStreetMap Field” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “ACF OpenStreetMap Field” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Fix: Duplicated Row (ACF 5.9+)


  • Upgrade FreeMapSK, CyclOSM


  • Feature: Settings page allowing you to disable specific map tile providersw
  • Feature: Fit markers in view (backend)
  • Upgrade: leaflet-providers, leaflet-control-geocoder, leaflet.locatecontrol


  • UI: Add Settings link on plugins list table
  • Fix: hide map provider with unconfigured api key from layer selection
  • Upgrade: leaflet-control-geocoder, leaflet.locatecontrol, leaflet-providers
  • Security hardening


  • Feature: make marker address formats localizable.
  • JS: pass map init object along with acf-os-map-create event
  • UI: hide add marker at my location button if markers cant be added


  • Feature: Add locate me button to backend
  • Fix: Geocoder search result still visible after marker added to map.
  • Fix: Required field and max_markers = 0 never saved
  • Fix: HERE app code not included in api requests


  • Feature: Observe DOM for newly added maps
  • Feature: allow manipulation of layer config in JS
  • Fix: JS event ‘acf-osm-map-marker-create’ not triggered


  • JS: added event Listener for ajax-loaded maps. Use $(my_map_div).trigger('acf-osm-map-added'); on each newly added map.
  • Upgrade LeafletJS to 1.6.0


  • Upgrade Leaflet Providers to 1.9.0
  • Upgrade Leaflet Control Geocode to 1.10.0
  • Fix: Redraw maps when they become visible


  • UI: Better formatting for automatic marker labels
  • Fix: Map controls zindex in Block-Editor
  • Fix: Adding markers not working on mobile devices


  • Fix: PHP Strict Standards message


  • Fix: Required Field behaviour – “required” means now “must hava a marker”


  • UI: Usability Improvements
  • Tested: Verfied Compatibility with Widgets, Block-Editor, Frontend Form
  • Stored data pretty much like google map field
  • Code: Refactored JS


Convert Values from ACF Googlemaps-Field


Initial Release