-
-
Notifications
You must be signed in to change notification settings - Fork 933
Closed
Labels
bug 🪲Something isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Mapbox Implementation
Mapbox
Mapbox Version
default
Platform
iOS, Android
@rnmapbox/maps version
#main
Standalone component to reproduce
import React, { useState } from 'react';
import MapboxGL from '@rnmapbox/maps';
const Camera = (props) => {
const [zoom, setZoom] = useState(12);
if (props && props?.coordinates?.pointsOfInterest?.length > 0) {
return (
<MapboxGL.Camera
zoomLevel={zoom}
centerCoordinate={[
props?.coordinates?.pointsOfInterest[0]?.longitude,
props?.coordinates?.pointsOfInterest[0]?.latitude,
]}
animationDuration={10}
animationMode={'none'}
followUserLocation={true}
followUserMode={MapboxGL.UserTrackingModes.FollowWithCourse}
followZoomLevel={zoom}
/>
);
}
};
export default Camera;
Observed behavior and steps to reproduce
[Bug]: Render Error : undefined is not an object (evaluating '_maps.default.UserTrackingModes.FollowWithCourse')
Expected behavior
The map should appear, the camera should start at the coordinates sent through props (latitude, longitude) and the camera should follow the user's location...
Notes / preliminary analysis
I am fairly new to mapbox, and I don't really know what could be wrong here...
Additional links and references
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug 🪲Something isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers