Marker component.
A Marker is a 2D component anchored to a position on the map. To animate the Marker when its target changes, see AnimatedMarker.
<Marker target={mapData.getByType('space')[0]}> <div>Hello, world!</div></Marker> Copy
<Marker target={mapData.getByType('space')[0]}> <div>Hello, world!</div></Marker>
Readonly
Optional
Used in debugging messages. You might want to set it explicitly if you want to display a different name for debugging purposes.
Legacy React Docs
Ignored by React.
Only kept in types for backwards compatibility. Will be removed in a future major release.
Marker component.
A Marker is a 2D component anchored to a position on the map. To animate the Marker when its target changes, see AnimatedMarker.
Example