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
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Set to a smaller zoom 10, use visibleFeaturesInRect to extract a certain MGLFeature, check the coordinate.
Set to a bigger zoom 20, use visibleFeaturesInRect to extract the same MGLFeature with step 1, check the coordinate.
Compare the coordinate
Expected behavior
Coordinates should be the same
Actual behavior
Coordinates are slightly different
The problem I have is that when the user clicks a feature at small zoom, I add an annotation view which exactly matches the feature's view, and zoom in to 20, the annotation view now has a slight offset from the feature itself.
Coordinate at zoom 13:
Coordinate at zoom 20:
The offset caused:
The text was updated successfully, but these errors were encountered:
This is expected behavior. To minimize their size, vector tiles use a quantized coordinate system that's precise enough for rendering a tile at the zoom level it's intended for, but not necessarily precise enough for higher zooms.
To place the MGLFeature precisely at all zoom levels, you should call visibleFeaturesInRect in response to zoom changes, and update the coordinate to match the response.
Platform: iOS
Mapbox SDK version: 3.5.4
Steps to trigger behavior
Expected behavior
Coordinates should be the same
Actual behavior
Coordinates are slightly different
The problem I have is that when the user clicks a feature at small zoom, I add an annotation view which exactly matches the feature's view, and zoom in to 20, the annotation view now has a slight offset from the feature itself.
Coordinate at zoom 13:
Coordinate at zoom 20:

The offset caused:
The text was updated successfully, but these errors were encountered: