• I’m not sure how long this has been an issue, but my client just brought it to my attention. The Leaflet JS based maps are not loading. The map interface and pins load, but the actual map itself is just solid gray. The console is not reporting any JavaScript errors.

    Switching the Return Format to iframe instead of Leaflet does load the map properly on the front end, but the admin pages seem to use Leaflet regardless of what the Return Format is, so my client can’t make any edits to the maps, since they can’t see what they’re doing. This is with version 1.6.1 of the plugin, ACF Pro 6.3.11, and WordPress 6.7.1.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi! I have the same problem !

    WordPress 6.7.1, ACF Pro 6.3.11 and ACF OpenStreetMap Field 1.6.1

    This is what I see in my debug console : https://ibb.co/4msrg0z

    Thank you in advance for your help and have a nice day !

    Same problem here with everything up-to-date.

    /ping @podpirate

    One week ago, I posted a message (issue) on GitHub : https://github.com/mcguffin/acf-openstreetmap-field/issues/134

    I can’t do much better myself… I have neither the time nor the inclination to audit the code to solve the problem 🙂

    Just bumping this to see if it gets any attention. This is still not working for me, and rolling back to 1.5.7 did not resolve the issue. I tried poking around the plugin code myself to see if I could resolve the issue and the best I was able to figure out is that the JSON in etc/leaflet-providers.json doesn’t validate, but even after I fixed those issues, the map still doesn’t load.

    I was able to drop the code from templates/osm.php into templates/admin.php and get an iframe-based map to show on the editing screen, with the pin in the right place, but the zoom isn’t set… that could probably be fixed, but since the iframe-based map doesn’t update dynamically when you search for a new location, it doesn’t really matter.

    Just following up on this… I was able to get the maps to work in WP admin by editing the field group file in my acf-json folder directly. There are a few parameters of the field I saw in the JSON file that initially didn’t seem to be directly editable in the ACF Field Group admin interface, although I think now that it may just be that I wasn’t understanding the Map Appearance field.

    I needed to have the OpenStreetMap.Mapnik layer selected. It’s selected by default in new fields created with the current version of the plugin, but I had a field group that had been created several years ago with an earlier version of the plugin, and it was missing the layers data.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Leaflet JS maps not loading’ is closed to new replies.