<Camera /> component not doing anything. #3362
Unanswered
cesarmlndz
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a component inside the with centerCoordinates, zoom, etc. and it is not taking any effect. I've confirmed my code with multiple sources. My other components work ( and others), it's the Camera that does nothing. Is anyone experiencing the same thing?
Code:
<Mapbox.MapView style={styles.map} scaleBarEnabled={false} zoomEnabled={true} scrollEnabled={true} styleURL={userMapData?.map_style}>
<Mapbox.Camera
zoomLevel={15}
centerCoordinate={coordinates} // Centered on California
animationMode={'flyTo'}
animationDuration={6000}
pitch={60}
/>
<Mapbox.ShapeSource
id="californiaPolygon"
shape={{
type: 'Feature',
properties: {},
geometry: {
type: 'Polygon',
coordinates: [californiaCoordinates],
}}}
>
<Mapbox.FillLayer id="californiaFill"
style={{fillColor: 'red', fillOpacity: 0.5,}}
/>
</Mapbox.ShapeSource>
</Mapbox.MapView>
Beta Was this translation helpful? Give feedback.
All reactions