This repository has been archived by the owner on Aug 25, 2023. It is now read-only.
Switch to mirrored duplicate source
technique to increase performance of hover/highlight user interactions
#258
Labels
Problem
Hover/Highlights can be slow to react to user input because
setFilter
is slow, specificallymousemove
events.Solution
The ideal solution would be to use featureState for all user interactions - which we can do for Geojson sources used in Circle, Heatmap, and Cluster layers.
Since feature
id
values cannot be enforced easily for Choropleth layer Vector Tile sources, instead of featureStates we can consistently use themirrored source
technique to increase hover / highlight performance. See mapbox/mapbox-gl-js#2874 (comment) for details on how this technique works.Outcome
Better user experience interacting with and filtering data in the Mapbox Visual.
cc/ @samgehret
The text was updated successfully, but these errors were encountered: