mcguffin / acf-openstreetmap-field

WordPress ACF Field for OpenStreetMap

Home Page:https://wordpress.org/plugins/acf-openstreetmap-field/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with 1.3.0

redweatherday opened this issue · comments

Hi, since the recent upgrade to v1.3.0 the acf-openstreetmap field in the field group only shows 'Map Appearance' | 'array' with no available settings. The 'Edit Post' page only shows the field title 'Walk Map | Double click to add Marker. Tap and hold to add Marker. Drag Marker to move.' with no available map to configure.
The map does display when viewing the finished post, but of course I cannot add any markers.

Due to waiting for an update to a crucial plugin I am still using Wordpress v4.9.16.

I have used this plugin since a very early version and this is the first issue I have been aware of.
Thanks for a great plugin, lightweight and very easy to use.

Having the same issue. I tried debugging.

In the ACF editor In ACF.php echo $map_field->format_value( $field['value'], null, $inp_field ); throws an error because format_value expects 'return_format' to equal one of (raw|osm|leaflet) and instead I'm seeing it send 'admin' and 'leaflet_map'. modifying this to match fixed the map loading.

In my post populating with ACF, the map doesn't lead. Initially, before debugging, I deduced the first error in acf-input-osm.js where if ( 'open_street_map' !== field.type ) it would return, when instead it should check 'open_street_map' !== field.data.type. Once I got it load the correct js script, suddenly the code populating the div with [data-editor-config] disappeared, so I'm still stuck…

Furthermore, the code makes calls to the deprecated $html = apply_filters( 'osm_map_iframe_template', $html ); hook despite the changelog mentioning that it's been removed.

I'm starting to think this may be an issue integrating with the latest ACF (5.9.3)