Class: ClusterIconStyle

ClusterIconStyle()

This class represents the object for values in the styles array passed to the MarkerClusterer constructor. The element in this array that is used to style the cluster icon is determined by calling the calculator function.

Constructor

new ClusterIconStyle()

Properties:
Name Type Attributes Default Description
url string The URL of the cluster icon image file. Required.
height number The display height (in pixels) of the cluster icon. Required.
width number The display width (in pixels) of the cluster icon. Required.
anchorText Array <optional>
The position (in pixels) from the center of the cluster icon to where the text label is to be centered and drawn. The format is [yoffset, xoffset] where yoffset increases as you go down from center and xoffset increases to the right of center. The default is [0, 0].
anchorIcon Array <optional>
The anchor position (in pixels) of the cluster icon. This is the spot on the cluster icon that is to be aligned with the cluster position. The format is [yoffset, xoffset] where yoffset increases as you go down and xoffset increases to the right of the top-left corner of the icon. The default anchor position is the center of the cluster icon.
textColor string <optional>
"black" The color of the label text shown on the cluster icon.
textSize number <optional>
11 The size (in pixels) of the label text shown on the cluster icon.
textDecoration string <optional>
"none" The value of the CSS text-decoration property for the label text shown on the cluster icon.
fontWeight string <optional>
"bold" The value of the CSS font-weight property for the label text shown on the cluster icon.
fontStyle string <optional>
"normal" The value of the CSS font-style property for the label text shown on the cluster icon.
fontFamily string <optional>
"Arial,sans-serif" The value of the CSS font-family property for the label text shown on the cluster icon.
backgroundPosition string <optional>
"0 0" The position of the cluster icon image within the image defined by url. The format is "xpos ypos" (the same format as for the CSS background-position property). You must set this property appropriately when the image defined by url represents a sprite containing multiple images. Note that the position must be specified in px units.
Source: