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

React-map-gl with globe creates artifacts at high zoom #11750

Closed
SnailBones opened this issue Apr 13, 2022 · 2 comments
Closed

React-map-gl with globe creates artifacts at high zoom #11750

SnailBones opened this issue Apr 13, 2022 · 2 comments
Assignees

Comments

@SnailBones
Copy link
Contributor

mapbox-gl-js version: Main branch

browser: Tested in Firefox and Chrome

Steps to Trigger Behavior

  1. Create an app using react-map-gl and create-react-app
  2. Set projection to globe
  3. Zoom in until map transitions to Mercator

image_720

Screen.Recording.2022-04-01.at.2.18.45.PM.mov
@SnailBones
Copy link
Contributor Author

SnailBones commented Apr 14, 2022

This is caused by a de-syncing of projection state between react-map-gl and mapbox-gl-js When the zoom passes the globe-to-mercator transition,map.transform.projection is set by react to be globe when it should be mercator.

Comment here:

  // Mapbox map is stateful.
  // During method calls/user interactions, map.transform is mutated and
  // deviate from user-supplied props.
  // In order to control the map reactively, we shadow the transform
  // with the one below, which reflects the view state resolved from
  // both user-supplied props and the underlying state

@SnailBones
Copy link
Contributor Author

Fixed by visgl/react-map-gl#1841, fix has already been released.

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.

1 participant