mapbox / mapbox-gl-draw

Draw tools for mapbox-gl-js
https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/
ISC License
942 stars 590 forks source link

Proposal: disable hot/cold switch when rendering only a few features #916

Open macobo opened 5 years ago

macobo commented 5 years ago

Currently, this causes significant flicker even in cases where it's avoidable.

In our case, we render only 1 feature that's being drawn/edited within draw. The feature seems to disappear/flicker for a second when finishing a vertex move.

This flicker is visible even in this example: https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/ - obviously on a larger map with more things on other layers the issue is even worse.

Issue seems to come comes from it moving between cold and hot layers. In case of a single feature being edited though, would it make sense to have everything in the hot layer for example?

Related tickets:

zakjan commented 4 years ago

Could be fixed by https://github.com/mapbox/mapbox-gl-draw/issues/994