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
mapbox gl has support for advanced properties on Markers like anchor (https://docs.mapbox.com/mapbox-gl-js/api/markers/#Marker). I know we can achieve a similar effect with offset in react-map-gl markers, but I'd prefer to use a similar API.
As react-map-gl is presented as a "wrapper" around mapbox gl it surprised me a little bit to see custom implementations for markers, popups, etc. Is there any reason in particular for this? Why use customized implementations instead of 1-1 React wrappers around the underlying API?
The text was updated successfully, but these errors were encountered:
mapbox-gl's API does not support using it as a fully controlled React component. In short, because React and Mapbox run separate render loops, we cannot guarantee that the map and any other component in the React tree gets updated at the same time, unless we block the map from handling user input.
You can see some relevant discussion in this thread:
mapbox gl has support for advanced properties on Markers like
anchor
(https://docs.mapbox.com/mapbox-gl-js/api/markers/#Marker). I know we can achieve a similar effect with offset in react-map-gl markers, but I'd prefer to use a similar API.As react-map-gl is presented as a "wrapper" around mapbox gl it surprised me a little bit to see custom implementations for markers, popups, etc. Is there any reason in particular for this? Why use customized implementations instead of 1-1 React wrappers around the underlying API?
The text was updated successfully, but these errors were encountered: