Tooltip not displaying when using geojson file

53 views
Skip to first unread message

Paulo Azevedo

unread,
Jul 6, 2023, 7:56:59 PM7/6/23
to Leaflet
Hi there,

I have circle markers with tooltip and popup working fine, when I use json data inside the script.

Can be checked in this fiddle:

https://jsfiddle.net/meteolitoral/8Lt06av7/

However when I try to use an external geojson file from here:

https://meteolitoral.com/test.geojson

I get an empty map as you can see in this fiddle:

https://jsfiddle.net/meteolitoral/d9y6c7uh/103

Fidlle doesn't give me any error and I checked and rechecked and even tried different solutions but problem isn't solved, so I need a your precious help!
Thank you so much!

Regards
Paulo

 

Edwin Corrigan

unread,
Jul 7, 2023, 3:10:03 AM7/7/23
to leafl...@googlegroups.com
Hi Paulo, 

There is an error when I run the fiddle:
image.png

Your map is fine, but for the fetch to work, Cross Origin Requests (CORS) need to be enabled on this domain - https://meteolitoral.com/test.geojson

--

---
You received this message because you are subscribed to the Google Groups "Leaflet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leaflet-js+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leaflet-js/6afbcfd7-f773-436b-85f0-27347e3ae7c8n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages