react-mapbox-gl
react-mapbox-gl copied to clipboard
Invalid LngLat object error when zooming on markers
react-mapbox-gl version: 5.1.1
const Mapbox = ReactMapboxGl({
minZoom: 6,
accessToken,
attributionControl: false,
doubleClickZoom: false,
});
<Mapbox
style="mapbox://styles/mapbox/light-v10?optimize=true"
containerStyle={{
flex: 1,
height: "100%",
width: "100%",
}}
flyToOptions={{
speed: 0.1,
curve: 0,
}}
onDrag={onDrag}
zoom={[6]}
center={center}
onStyleLoad={onStyleLoad}
renderChildrenInPortal
>
<JobMarker
anchor="bottom"
data={[]}
onClick={onMarkerClick}
selected={data}
/>
</Mapbox>
If I remove the initial zoom on the Mapbox
component everything works fine. But with it added, whenever I zoom I get the following error: