Skip to main content

interface

ClustererEventTable

The list of events that can be emitted by clusterer.

Properties

click

Emitted when the marker/cluster is clicked.

mousedown

Emitted when the user presses a mouse button over the marker/cluster.

mousemove

Emitted when the user moves the pointer over the marker/cluster.

mouseout

Emitted when the user moves the pointer away from the marker/cluster.

mouseover

Emitted when the user hovers over the marker/cluster.

mouseup

Emitted when the user releases the mouse button over the marker/cluster.

touchend

Emitted when the user lifts the finger off the marker/cluster.

touchstart

Emitted when the user taps on the marker/cluster.

ClustererOptions

Clusterer initialization options.

Properties

clusterStyle?

ClusterStyle|(pointsCount: number, target: ClusterTarget) => ClusterStyle

Style of clusters. This parameter accepts an object or a function. When given an object, the same style will be applied to all clusters. If you want to customize the style based on the number of markers within the cluster, you can provide a function instead.

disableClusteringAtZoom?

number

At this zoom level and above, markers will not be clustered.

radius?

number

Clustering radius in pixels.

ClustererPointerEvent

The event type for pointer-related clusterer events.

Properties

lngLat

number[]

Geographical coordinates of the event.

originalEvent

MouseEvent|TouchEvent

The original DOM event.

point

number[]

Screen coordinates of the event.

target

Target (a marker or a cluster) of the event.

ClusterTarget

Cluster event target.

Properties

data

InputMarker[]

Markers contained in the targeted cluster.

id

number

Cluster identifier.

type

"cluster"

Type of the target.

userData?

any

User specific data.

HtmlClusterStyle

Cluster style for HTML Marker

Properties

anchor?

number[]

The position in pixels of the "tip" of the HTML marker relative to its top-left corner.

html

string|HTMLElement

HTML content of the HTML marker.

maxZoom?

number

Maximum display zoom level of the HTML marker.

minZoom?

number

Minimum display zoom level of the HTML marker.

preventMapInteractions?

boolean

Capture events if set, otherwise events will passed to the map. Use this setting if you want to disable map zoom/scroll over html marker. By default it's true .

type

"html"

zIndex?

number

Draw order.

HtmlInputMarker

Marker style for HTML marker

Properties

anchor?

number[]

The position in pixels of the "tip" of the HTML marker relative to its top-left corner.

coordinates

number[]

Geographical coordinates of marker center [longitude, latitude] .

html

string|HTMLElement

HTML content of the HTML marker.

maxZoom?

number

Maximum display zoom level of the HTML marker.

minZoom?

number

Minimum display zoom level of the HTML marker.

preventMapInteractions?

boolean

Capture events if set, otherwise events will passed to the map. Use this setting if you want to disable map zoom/scroll over html marker. By default it's true .

type

"html"

userData?

any

User specific data.

zIndex?

number

Draw order.

[key: string]

any

InputMarkerLabelOptions

Initialization options of the marker's label.

Properties

anchor?

number[]

The offset distance of text box from its relativeAnchor . Positive values indicate left and up, while negative values indicate right and down.

DEPRECATED! Will be removed in the next major release, use the offset option instead.

color?

string

Text color in hexadecimal RGB ( #ff0000 ) or RGBA ( #ff0000ff ) format.

fontSize?

number

Text size.

haloColor?

string

Color of letters background (when haloRadius is specified). Same format as for color .

haloRadius?

number

Use haloRadius to add background behind each letter.

letterSpacing?

number

Space between each letter.

lineHeight?

number

For multiline label lineHeight specify how far lines between each other.

maxZoom?

number

Maximum display zoom level of the label.

minZoom?

number

Minimum display zoom level of the label.

offset?

number[]

The offset distance of text box from its relativeAnchor . Positive values indicate right and down, while negative values indicate left and up.

relativeAnchor?

number[]

The relative, from 0 to 1 in each dimension, coordinates of the text box "tip". relative to its top left corner, for example: [0, 0] value is the top left corner, [0.5, 0.5] — center point, and [1, 1] is the bottom right corner of the box. The label will be placed so that this point is at geographical coordinates respects the absolute offset .

text

string

Label's text.

zIndex?

number

Draw order.

MarkerTarget

Marker event target.

Properties

data

The targeted marker.

type

"marker"

Type of the target.

userData?

any

User specific data.

WebglClusterStyle

Cluster style for MapGL Marker

Properties

anchor?

number[]

The position of the "tip" of the icon (relative to its top left corner). The icon will be aligned so that this point is at the cluster's geographical location. Centered by default if anchor is not specified and custom icon is provided.

hoverAnchor?

number[]

Cluster icon anchor in hovered state.

hoverIcon?

string

Cluster icon URL in hovered state.

hoverSize?

number[]

Cluster icon size [width, height] in hovered state in pixels.

icon?

string

Cluster icon URL.

labelAnchor?

number[]

The offset distance of text box from its relativeAnchor . Positive values indicate left and up, while negative values indicate right and down.

DEPRECATED! Will be removed in the next major release, use the offset option instead.

labelColor?

string

Label's text color of a cluster in CSS hexadecimal RGB format (e.g. #ff0000 ).

labelFontSize?

number

Label's text font size of a cluster.

labelHaloColor?

string

Label's text background color of a cluster in CSS hexadecimal RGB format (e.g. #ff0000 ).

labelHaloRadius?

number

Label's text background radius of a cluster. The background is set for each letter of the text.

labelLetterSpacing?

number

Label's text letter spacing of a cluster.

labelOffset?

number[]

The offset distance of text box from its relativeAnchor . Positive values indicate right and down, while negative values indicate left and up.

labelRelativeAnchor?

number[]

The relative, from 0 to 1 in each dimension, coordinates of the text box "tip". relative to its top left corner, for example: [0, 0] value is the top left corner, [0.5, 0.5] — center point, and [1, 1] is the bottom right corner of the box. The label will be placed so that this point is at geographical coordinates respects the absolute offset .

labelText?

string

Label's text of a cluster. By default, it's the size of the cluster.

size?

number[]

Cluster icon size [width, height] in pixels.

type?

"webgl"

zIndex?

number

Draw Order

WebglInputMarker

Marker style for MapGL marker.

Properties

anchor?

number[]

The position of the "tip" of the icon (relative to its top left corner). The icon will be aligned so that this point is at the marker's geographical location. Centered by default if anchor is not specified and custom icon is provided.

coordinates

number[]

Geographical coordinates of marker center [longitude, latitude] .

hoverAnchor?

number[]

Marker icon anchor in hovered state.

hoverIcon?

string

Marker icon URL in hovered state.

hoverSize?

number[]

Marker icon size [width, height] in pixels in hovered state.

icon?

string

Marker icon URL.

label?

Initialization options of the marker's label.

size?

number[]

Marker icon size [width, height] in pixels.

type?

"webgl"

userData?

any

User specific data.

zIndex?

number

Draw order.

[key: string]

any