mcguffin / acf-openstreetmap-field

WordPress ACF Field for OpenStreetMap
https://wordpress.org/plugins/acf-openstreetmap-field/
GNU General Public License v3.0
107 stars 21 forks source link

Map not shown and Settings -> openstreet map disabled most of fields #109

Open zeyzone opened 7 months ago

zeyzone commented 7 months ago

All works well though the plugin updated to the latest version.

Then I changed the map zoom setting 11 to 15 and saved. After that both open street maps of wp-admin acf field group aread and front end not showing the map as attached image

error1

Further when I checked the wp admin settings > OpenStreetMap most of settings are disabled as attached image

error2

Please kindly review the issue.

schischa commented 6 months ago

Got exactly the same error here. Also its weird because I get the message that the openseamap URL couldn't be loaded in the browser console, even though it's disabled in the settings.

odai-alali commented 4 months ago

It seems that for some reason, JS initializer does not respect these settings. As a temporary solution, try enabling all map layers.

Update

I wasn't able to reproduce this bug on my local setup using the same versions of wordpres@6.4.3, acf@6.2.7 and acf_osm@1.5.6 on both my published and dev site.

An error is thrown here tile-layer-provider.js that a provider does not exist when it's disabled in the settings page, which makes sense, but I was not able to find from where this initializer is called (no experience with leaflet) and why it's trying to initialize a disabled layer.

@mcguffin I hope you can share a tip, thanks.

margarita-boomCodes commented 2 months ago

@mcguffin I get the same with the following error "Undefined array key "layers". Down to version 1.5.0 it works fine again. layers

margarita-boomCodes commented 2 months ago

@mcguffin I get the same with the following error "Undefined array key "layers". Down to version 1.5.0 it works fine again.

I think I found the problem: I had deactivated some "default" maps on the options page.

AlaplayaW commented 2 months ago

Same problem when I deactivate maps... On the other hand, if I keep all the layers activated, it works for me.