HtmlMarkerOptions interface
Options for rendering an HtmlMarker object
- Extends
Properties
| anchor | Indicates the marker's location relative to its position on the map.
Optional values: |
| color | A color value that replaces any {color} placeholder property that has been included in a string htmlContent.
default |
| draggable | Indicates if the user can drag the position of the marker using the mouse or touch controls.
default |
| html |
The HTML content of the marker. Can be an HTMLElement or HTML string. Add {text} and {color} to HTML strings as placeholders to make it easy to update these values in your marker by using the setOptions function of the HtmlMarker class. This allows you to create a single HTML marker string that can be used as a template for multiple markers. |
| pixel |
An offset in pixels to move the popup relative to the markers center.
Negatives indicate left and up.
default |
| popup | A popup that is attached to the marker. |
| position | The position of the marker.
default |
| secondary |
A color value that replaces any {secondaryColor} placeholder property that has been included in a string htmlContent.
default |
| text | A string of text that replaces any {text} placeholder property that has been included in a string htmlContent. |
| visible | Specifies if the marker is visible or not.
default |
Property Details
anchor
Indicates the marker's location relative to its position on the map.
Optional values: "center", "top", "bottom", "left", "right",
"top-left", "top-right", "bottom-left", "bottom-right".
Default "bottom"
anchor?: PositionAnchor
Property Value
color
A color value that replaces any {color} placeholder property that has been included in a string htmlContent.
default "#1A73AA"
color?: string
Property Value
string
draggable
Indicates if the user can drag the position of the marker using the mouse or touch controls.
default false
draggable?: boolean
Property Value
boolean
htmlContent
The HTML content of the marker. Can be an HTMLElement or HTML string. Add {text} and {color} to HTML strings as placeholders to make it easy to update these values in your marker by using the setOptions function of the HtmlMarker class. This allows you to create a single HTML marker string that can be used as a template for multiple markers.
htmlContent?: string | HTMLElement
Property Value
string | HTMLElement
pixelOffset
An offset in pixels to move the popup relative to the markers center.
Negatives indicate left and up.
default [0, 0]
pixelOffset?: Pixel
Property Value
popup
position
secondaryColor
A color value that replaces any {secondaryColor} placeholder property that has been included in a string htmlContent.
default "white"
secondaryColor?: string
Property Value
string
text
A string of text that replaces any {text} placeholder property that has been included in a string htmlContent.
text?: string
Property Value
string
visible
Specifies if the marker is visible or not.
default true
visible?: boolean
Property Value
boolean