Closed robertandrews closed 2 years ago
Is the script https://www.example.com/wp-content/plugins/acf-openstreetmap-field/assets/js/acf-osm-frontend.js?ver=1.1.9
being loaded?
Can you see any JS-errors in the Browser console?
It loads for me, but map still doesn't show. What would be blocking that?
This is the only js that I can find that loads .../wp-content/plugins/acf-openstreetmap-field/assets/js/acf-osm-frontend.min.js?ver=1.2.0
Hello,
I am using the ACF Openstreetmap Field 1.2.1 plugin and the following plugins: Elementor 3.0.3 + elementor pro 3.0.1 + Advanced Custom Fields 5.9+Insert PHP Code Snippet 1.31.1
I created a php snippet named [xyz-ips snippet = "carte-osm"] <? php $ note = get_field ('carteosm'); ?> <? php the_field ('carteosm'); ?>
which I display via "text editor widget elementor" with the php Snippet named [xyz-ips snippet = "map-osm"]
It was working perfectly and now I have the following error
The Leaflet card is all gray, there are only the + and - buttons at the top left and the leaflet link at the bottom right
with the following error in the Google Chrome console
JQMIGRATE: Migrate is installed, version 1.4.1
acf-osm-frontend.min.js? ver = 1.2.1: 1 Uncaught TypeError: Unable to read property 'OpenStreetMap' from null
to e.initialize (acf-osm-frontend.min.js? ver = 1.2.1: 1)
to the new e (acf-osm-frontend.min.js? ver = 1.2.1: 1)
at Function.u.tileLayer.provider (acf-osm-frontend.min.js? ver = 1.2.1: 1)
to String.
Thanks in advance
@mcguffin, Hoping you are doing good.
The "Leaflet JS map" issue seems to be occurring now also.
For me the error is "Uncaught No such variant of OpenStreetMap (Mapnik)" I have opened up a new thread with the details. if both these issues corresponds to the same, please merge the requests.
Thanks in advance.
@scarlet959 Thank you so much for asking! Health still okay, but big corona fatigue like (assumably) everbody else... Your issue looks a bit different so I answered in #66.
@robertandrews, @frankypixels Does the issue still occur in 1.3.2? @stef5962 Your case looks like the script can't find the provider settings. Can you provide me an URL where I can see what's actually going wrong?
@mcguffin No, now it's working again. Thank you.
This is no longer showing a map on the front-end.
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="["OpenStreetMap"]" data-map-markers="[{"label":"Palais des Festivals, Boulevard de la Croisette, Cannes, France","default_label":"","lat":43.5507815,"lng":7.0174321}]"></div>
The following stylesheet is included at the bottom, and goes to a working file…
<link rel="stylesheet" id="leaflet-css" href="http://www.example.com/wp-content/plugins/acf-openstreetmap-field/assets/css/leaflet.min.css?ver=1.1.9" 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.