Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 1.68 KB

MarkerView.md

File metadata and controls

26 lines (20 loc) · 1.68 KB

<MapboxGL.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.

props

Prop Type Default Required Description
coordinate tuple none true The center point (specified as a map coordinate) of the marker.
anchor shape { x: 0.5, y: 0.5 } false 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).
  x number none true FIX ME NO DESCRIPTION
  y number none true FIX ME NO DESCRIPTION
allowOverlap boolean false false @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.
isSelected boolean false false FIX ME NO DESCRIPTION
children ReactReactElement none true One or more valid React Native views.