osmbuildings icon indicating copy to clipboard operation
osmbuildings copied to clipboard

Add LeafletJS 1.0 support

Open josefpaij opened this issue 8 years ago • 2 comments

I am using Leaflet 1.0 in a project and would like to use OSMBuildings. However, there is an issue where the buildings get completely redrawn on the moveend event and they briefly disappear. Here is an example forked from the "Integrate with LeafletJS" example in the docs, using [email protected] instead of [email protected]: http://codepen.io/anon/pen/XNbwYK

Are there plans to add support for LeafletJS 1.0? Any idea how to get around the redraw disappearance?

josefpaij avatar Nov 08 '16 19:11 josefpaij

I'd love to spent more time on 2.5D version but have very little time to do so. The flicker did appear on earlier versions as well as it does in OpenLayers. Basically on moveend many things are rebuilt. A slightly changed event emission might cause this.

kekscom avatar Nov 08 '16 23:11 kekscom

Looks like the flickering is caused by the map drag inertia. Unfortunately you can't disable it directly but setting the inertiaDeceleration to a high enough value will effectively disable it and prevent flickering. I wasn't able to get it flicker-free with inertia.

tuckwat avatar Nov 11 '16 15:11 tuckwat