Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug - Marker positions not updated when DEM data loads #10982

Closed
dpdiliberto opened this issue Sep 1, 2021 · 0 comments · Fixed by #10985
Closed

Bug - Marker positions not updated when DEM data loads #10982

dpdiliberto opened this issue Sep 1, 2021 · 0 comments · Fixed by #10985
Assignees

Comments

@dpdiliberto
Copy link
Contributor

mapbox-gl-js version: 2.4.1

browser: Chrome

Steps to Trigger Behavior

  1. Add Markers at runtime, where map is pitched and 3D terrain is enabled
  2. After raster-dem source is added to the map, the markers end up in the incorrect spot
  3. The Markers positions end up in the correct spot after zooming or panning the map again

Link to Demonstration

https://jsfiddle.net/0wku2q8L/

Expected Behavior

We expect that Marker positions would be updated whenever DEM data loads.

Actual Behavior

Currently Marker positions are updated on move and moveend events, but they’re not fired whenever DEM data loads after enabling terrain. We should either subscribe to a corresponding event in the marker code, or fire move on terrain load since it may extent to other similar use cases. https://github.com/mapbox/mapbox-gl-js/blob/main/src/ui/marker.js#L259-L260

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants