Closed ryanimpey closed 3 years ago
Would be a good improvement!
@kekscom Would this be a feature you'd be able to add? If not could you point me in a direction as to where I would start to add this enhancement. Thanks!
You are very welcome to help!
These are the code parts, that decide between data tiles and a GeoJSON. https://github.com/kekscom/osmbuildings/blob/master/src/Data.js#L125 https://github.com/kekscom/osmbuildings/blob/master/src/Data.js#L144
Everywhere in that file you should remove separation between data sources and handle both.
@kekscom Just to add to this, if I wanted to look into adding multiple, seperate GeoJson layers that could be toggled using the Leaflet Layer Groups and Layers Control (much like in this example http://leafletjs.com/examples/layers-control/) How would I go about doing that/what files would need modifying?
Thank you!
Hi, OSM Buildings is absolutely not designed to run multiple instances. I also think it's a bad idea performance wise. My approach would be hacking the Leaflet layer switcher in order to make up and handle artificial layers.
Am 02.09.2017 um 19:10 schrieb Ryan notifications@github.com:
@kekscom If I wanted to look into adding multiple, seperate GeoJson layers that could be toggled using the Leaflet Layer Groups and Layers Control (much like in this example http://leafletjs.com/examples/layers-control/) How would I go about doing that/what files would need modifying?
Thank you!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Adding a geojson object to the map whilst a building layer is already assigned will overwrite all buildings/geojson data currently on the map. With leaflet layers it would be nice to be able to show json on a seperate layer whilst keeping the main building layer visible as a base layer.
Thanks!