Maps icon indicating copy to clipboard operation
Maps copied to clipboard

Creating my own layers

Open lakik opened this issue 2 years ago • 4 comments

Hi Jeroen,

thank you for this great extension. By using it the question pops up if it would be possible to create my own layers out of a shape or geojson file. Just to overlay a given map but with the possibility to chose which overlay I want to see implemented in same menu where you can chose the layer (topo cycle etc).

Thank you!

Laki

EDIT: Also asked here: https://www.mediawiki.org/wiki/Topic:Wqi0g4h5zqyho1wj

lakik avatar Feb 22 '22 10:02 lakik

You can with Google Maps and KML: https://maps.extension.wiki/wiki/Google_Maps_examples#KML

I do not remember if this is possible with Leaflet and/or GeoJSON.

JeroenDeDauw avatar Feb 22 '22 12:02 JeroenDeDauw

Thank you for your answer. I tried it with kml but it dosen't work. I tried various kinds of kml files ( e.g. directly created via google etc) but nothing worked out. Always the same error " Failed parsing one or more KML files. Usually this happens because of retrieval failure or malformed XML."

kmz is working.

Could you please give me a hint how i get the kml files run. Maybe you can lead me to a working kml file. Thanks a lot!

lakik avatar Feb 23 '22 17:02 lakik

You could try with the file from the demo wiki to see if the issue is with the contents of the KML file or with retrieving the file. You could also see what happens in your browser console. Upon loading the page will make a web request to the KML file via JS. Perhaps that is failing.

JeroenDeDauw avatar Feb 23 '22 19:02 JeroenDeDauw

Hi, i tried it with the berlin map, but unfortunately with the same error. The console gave me no hints what to do. Are there some settings within wikimedia necessary?

lakik avatar Feb 25 '22 14:02 lakik