import { MarkerView } from '@rnmapbox/maps';
MarkerView
MarkerView represents an interactive React Native marker on the map.
If you have static views, consider using PointAnnotation or SymbolLayer to display an image, as they'll offer much better performance. Mapbox suggests using this component for a maximum of around 100 views displayed at one time.
This is implemented with view annotations on Android and iOS.
This component has no dedicated onPress
method. Instead, you should handle gestures
with the React views passed in as children
.
Position
required The center point (specified as a map coordinate) of the marker.
type Anchor = {
x: number; /* FIX ME NO DESCRIPTION */
y: number; /* FIX ME NO DESCRIPTION */
}
Any coordinate between (0, 0) and (1, 1), where (0, 0) is the top-left corner of the view, and (1, 1) is the bottom-right corner. Defaults to the center at (0.5, 0.5).
defaults to: { x: 0.5, y: 0.5 }
boolean
@v10
Whether or not nearby markers on the map should all be displayed. If false, adjacent markers will 'collapse' and only one will be shown. Defaults to false.
defaults to: false
boolean
Whether or not nearby markers on the map should be hidden if close to a UserLocation puck. Defaults to false.
defaults to: false
boolean
FIX ME NO DESCRIPTION
defaults to: false
ReactReactElement
required One or more valid React Native views.