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: "center", "top", "bottom", "left", "right", "top-left", "top-right", "bottom-left", "bottom-right". Default "bottom"

color

A color value that replaces any {color} placeholder property that has been included in a string htmlContent. default "#1A73AA"

draggable

Indicates if the user can drag the position of the marker using the mouse or touch controls. default false

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.

pixelOffset

An offset in pixels to move the popup relative to the markers center. Negatives indicate left and up. default [0, 0]

popup

A popup that is attached to the marker.

position

The position of the marker. default [0, 0]

secondaryColor

A color value that replaces any {secondaryColor} placeholder property that has been included in a string htmlContent. default "white"

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 true

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

A popup that is attached to the marker.

popup?: Popup

Property Value

position

The position of the marker. default [0, 0]

position?: Position

Property Value

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