CustomMarker
<CustomMarker />
component is used for display Maker with Custom React Element.
Basic Example
Props
Props | Type | Description |
---|---|---|
lat | number | latitude |
lng | number | longitude |
draggable | boolean | flag for draggable feature |
preventDragOnClickable | boolean | prevent drag event on clickable element. (e.g. a tag, button tag) |
onDragStart | (position: google.maps.LatLngLiteral) => void | callback for dragstart event. |
onDrag | (position: google.maps.LatLngLiteral) => void | callback for drag event. |
onDragEnd | (position: google.maps.LatLngLiteral) => void | callback for dragend event. |
Alternative
You can also display custom element with AdvancedMarker.