Home Forums Feature Requests OpenStreetMap support


OpenStreetMap support

  • From June 11 2018, Google Map will require a billing account to use a Google api key.

    It would be great to add support in the ACF core for an OpenStreetMap field to be used as an alternative to Google Map.

    This plugin seems to work well for now:

    it uses in the administration screen Leafletjs to rendering the map and for geocoding

  • I was just looking for the same function. This will be very helpful.

    The plugin from mcguffin hasn’t been commited since november and there is some todo list which make me think this is an abandoned project :/

  • Currently this plugin allows you to replicate all the features of the standard Google map field. Regarding the todo list, the html-output is not necessary, I write myself the code needed for site templates.

    However, my concern is about supporting future versions of ACF, which is why I asked for inclusion in the core

  • I agree as well, this would be very helpful. I will try the plugin suggested as well, but would be great if this could be added to ACF Core.

  • To be clear, Google didn’t just change the pricing structure, but as of June 11th, they’re saying you can’t use their platform for Directories.

    3.2.4 Restrictions Against Misusing the Services.

    (c) No Re-Creating Google Products or Features. Customer will not use the Services to create a product or service with features that are substantially similar to or that re-create the features of another Google product or service. Customer’s product or service must contain substantial, independent value and features beyond the Google products or services. For example, Customer will not:

    (iii) use the Google Maps Core Services in a listings or directory service or to create or augment an advertising product;


    If that’s not a reason for ACF to bring openstreetmap to core, IDK what is.

  • +1, highly needed 😉!

  • OpneStreetMap support urgently needed imo.

  • Probably not an easy task, but I support it. Any way to get the choice with Google alternatives is welcome.

  • Now in some websites i’m using the ACF google map field in the wordpress backend, while in the front end I’m using openstreetmap with leaflet.js (retrieving the coordinates from the google map field)

  • Google maps changes, for an agency especially, have made it unmanageable and too often leaves them with the bill. OpenStreetMap with leaflet.js is a must.

  • Absolutely brilliant solution ! It should be added by default. 😉

  • @fburatti Great aiming! Thank for sharing the link, sir.

    And do you know which exact code should be used to insert the acf-openstreetmap field inside the very single post’s template file?

    Really looking forward to this 🙂

  • Here is a complete example for a list of farm houses, I include the map both in the single post (one marker) and in the archive page with all the properties (multiple markers), it’s a simple port of what I used with google map.

    In the html code you need a div with id “acf-map” and the appropriate css style.

    Here is the Javascript part (required leaflet.js)

    this is the php part of wordpress

  • Hello!
    There is some way to change the map marker in OpenMapStreet, I am using Elementor PRO and ACF PRO thanks!

  • Hi, thanks for the the work on this.

    How can a map be displayed on the front end for each post with this field?


  • Hi !

    Did somebody find a way to use OpenStreetMap to render multiple markers?

    I used to do that with Google Maps ACF and Custom Post Types. It works like a charm.

    Things would be reaaaaaaaaally amazing if we could do the same with OpenStreetMaps! (and without loading any Google script like @fburatti did)

    Open Street Map compatibility would be really appreciated.


  • I would also like it if ACF also supports OpenStreetMap.
    Yes, I think google maps are a lot cooler, but it’s just soothing if you’re not constantly worried that Google Maps will eventually cost you money because too many requests were made by a plugin. You do not know what exactly happens in the background.

    With OpenStreetMap you can at least cache / save the maps, so that the connections could be significantly minimized.
    Overall, OpenStreetMap should be exciting.

    Well, I would also find it very good if ACF also offered maps of OpenStreetMap.
    There is already a plugin, but no official. But maybe the developer of the plugin can help.

  • The linked OpenstreetMap field plugin is good.

    It would be useful for ACF to consider OpenStreetMap.

    Google Maps is excellent, but Google’s API switch exposes people to paid API usage, possibly with unknown expense consequences.

    I just switched between these fields and now plan to shut down my Google Maps API account.

  • Like others, we’re thinking of changing as many sites as possible from Google Maps to OSM, and for this reason the ability to use OSM natively in ACF would be very welcome.

    Of course, this’d be even better if the OSM field also supported the more detailed address subfields that are now in the native Map field, so we could easily search or filter for city or post code.

  • +1 to get OSM natively in ACF. I agree with @philby that will be great to have the detail address subfields in order to filter by city or post code. @fburatti can you share your website where you have applied openstreetmap with leaflet.js? I want to take a look at what’s possible. Thank you

  • +1 for this – how many people do we need before Elliot considers implementing a Map field type which allows you to use either Google Maps or OSM?

  • This plugin is no longer showing a map on the front-end for me.

    It works fine in the back-end.

    Here is the code that manifests in the front…

    <div class="leaflet-map" data-height="350" data-map="leaflet" data-map-lng="7.0174313" data-map-lat="43.5507876" data-map-zoom="14" data-map-layers="[&quot;OpenStreetMap&quot;]" data-map-markers="[{&quot;label&quot;:&quot;Palais des Festivals, Boulevard de la Croisette, Cannes, France&quot;,&quot;default_label&quot;:&quot;&quot;,&quot;lat&quot;:43.5507815,&quot;lng&quot;:7.0174321}]"></div>

    The following stylesheet is included at the bottom, and goes to a working file…

    <link rel="stylesheet" id="leaflet-css" href="" type="text/css" media="all">

    That is with the Leaflet JS render setting enabled.

    The iFrame render setting actually still works.

    I don’t see any leaflet.js-type file at the bottom of source; don’t know if that’s necessary.

    Anyone know what’s going on?

  • I want to display a map for each post. I found short tips to use command the_field(‘map’);
    It only produces text adres+lat+lng but not the whole map.
    I backend it works quite well.
    Do you have any ideas?

Viewing 25 posts - 1 through 25 (of 30 total)

The topic ‘OpenStreetMap support’ is closed to new replies.