kekscom / osmbuildings

OSM Buildings Classic 2.5D
http://osmbuildings.org
BSD 2-Clause "Simplified" License
505 stars 140 forks source link

Filtered GeoJSON tiles #110

Closed hrishiballal closed 4 years ago

hrishiballal commented 6 years ago

Hello, Thank you for the continued work on this, it is really amazing.

I have a specific question not necessarily a feature request. When you use the addGeoJSONTiles (https://osmbuildings.org/documentation/#method-addGeoJSONTiles) method to load OSM tiles from tile server, is there a way to filter out some features?

I want to load some existing buildings but not all. E.g. show all buildings except around 500m buffer around a park. How would / could something like this work?

kekscom commented 6 years ago

Hi Hrishi, You could use the loadfeature event for it. That gets you full access to the feature upon load and you can modify it or return null. The catch is, we are going to deprecate that with next version. The replacement will allow show/hide at any time. But also it’s unlikely we are passing geometry. So how would you figure out affected features? There is room for some ideas 😀

kekscom commented 4 years ago

We did not act for a way too long time. Please reopen if this is still urgent.