You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I checked the release info from v0.44.0 to v0.44.2 but didn't have a clue which fix or new feature makes the transition longer.
I created a demo: https://jsfiddle.net/yixu/trq96bkh/
When you hover over the symbol, you will notice the transition. If you change the version to v.43.0, the transition is much faster. The transition in v0.44.2 is a bit too long for a good hover effect.
The text was updated successfully, but these errors were encountered:
Hi @Roxyi, the relevant change is PR #6497, which fixed a number of edge cases in which the results of queryRenderedFeatures (which is used to implement mouseenter/mouseleave and thus needed for hover effects) were temporarily incorrect. That could cause flickering as described in #5506. The behavior in v0.43 was sometimes faster, but also not quite correct (in your demo I can see the markers flicker on and off).
The reason for the delay is that when we change the marker state we have to re-run collision detection to see if the markers collide with any other symbols on the map (even though the markers don't actually change size, the collision detection code doesn't know that until it runs). Because collision detection is relatively expensive, we only run it once every 300ms. That introduces the delay you see.
I played around with your fiddle, and you can get a pretty good hover effect by setting text-allow-overlap and icon-allow-overlap to true for both layers (test-marker and test-marker-hover). By turning on "allow overlap", you get rid of the collision detection requirement, so the marker can display instantly. The downside of this approach is that the markers can overlap with each other -- in a production app, one way to approach this problem would be to control the density of markers based on tile zoom level so that there's not too much overlap.
I'm closing this because it looks like intended behavior, but I understand the collision detection timing requirements are difficult to work with for hover-states, and that's something we'll continue to look at as we make improvements.
I checked the release info from v0.44.0 to v0.44.2 but didn't have a clue which fix or new feature makes the transition longer.
I created a demo: https://jsfiddle.net/yixu/trq96bkh/
When you hover over the symbol, you will notice the transition. If you change the version to v.43.0, the transition is much faster. The transition in v0.44.2 is a bit too long for a good hover effect.
The text was updated successfully, but these errors were encountered: