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
Hi @carolineleger, any props that are functions or objects need to be memoized to prevent this from happening. In your case you need to memoize your handleGeocoderViewportChange function. For more info check out issue #84.
Hi,
I'm having the exact same issue as this one:
#81
With the menu reopening after searching, except that i'm not using bbox.
My geocoder search field is outside my map component, I also tried to put it in the same component, but with same results.
Any idea?
Thanks!
const Map = (props) => {
const mapRef = useRef();
const handleViewportChange = (view) => {
props.updateMap({...props.map, ...view})
}
const handleGeocoderViewportChange = (viewport) => {
const geocoderDefaultOverrides = { transitionDuration: 2000 };
};
return (
<MapGL
ref={mapRef}
{...props.map}
width="100%"
height="100%"
onViewportChange={handleViewportChange}
mapboxApiAccessToken={mapboxToken}
mapStyle='mapbox://styles/mapbox/streets-v11'
>
)
}
The text was updated successfully, but these errors were encountered: