Marker
The <Marker/>
component is a child of Map, it causes a marker to appear at a specific location on a map. Markers can have a Popup that provides more information.
Props
anchor
"center" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined
children
ReactNode
color
string | undefined
draggable
boolean | undefined
location
[number, number] | GeoPoint | undefined
offset
[number, number] | Point | undefined
onClick
EventHandler | undefined
onDrag
EventHandler | undefined
onDragend
DragHandler | undefined
onDragstart
DragHandler | undefined
onMouseenter
EventHandler | undefined
onMouseleave
EventHandler | undefined
popup
MarkerPopup | undefined
togglePopup
boolean | undefined
Associated Types
Point
A Point geometry object, which has x and y properties representing screen coordinates in pixels.
Property | Type | Comments |
---|---|---|
x | number | X coordinate in pixels. |
y | number | Y coordinate in pixels. |