Closed Rounak-Dwary closed 1 year ago
Hi @Rounak-Dwary
looking at this function it seems to me that it requires a kmz URL rather than a blob file:
That means, something like the following:
L.kmzLayer('path/to/your/server/demo.kml' /* and not require('../demo.kml') */, { ...your_custom_options })
👋 Raruto
Thanks for the fast reply . But is there a way to use local files?
I assume you mean to load raw data, instead of using a local server like:
http://localhost/path/to/your/filename.kmz.
Have you already tried with calling directly the parse(data, props)
function?
For more info:
So I am using some kml file that are to be displayed on a map using react-leaflet. The code for the kmllayer is :
Now the above code does not display any markers present in the kml file. So I tried adding geometryLayer which solves the problem but it removes all the tooltips and popups present in the kml file and also overrides all styling.I am new to leaflet and using leaflet-kmz for the first time. Could you please hep me?
Code after adding the geometryToLayer():
demo.zip