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'm using react-map-gl library so I'm using useRefs to hook into the map object instead. I made a CSB but its has some issue. I would like it to stop spinning at a certain zoomLevel (5) and I think it might be causing infinite loops.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Anyone successfully created a mapbox spinning globe using useRefs and useEffect instead of using this solution ... https://docs.mapbox.com/mapbox-gl-js/example/globe-spin/
I'm using react-map-gl library so I'm using useRefs to hook into the map object instead. I made a CSB but its has some issue. I would like it to stop spinning at a certain zoomLevel (5) and I think it might be causing infinite loops.
https://codesandbox.io/s/rotating-globe-with-react-n74pdh
Beta Was this translation helpful? Give feedback.
All reactions