markers

Specifies a data source for the map markers.

Type: Array|String
Default Value: undefined
Cannot be used in themes.

Data you need to provide for map markers depends on the type of the markers you use. Generally, you need to declare an array of objects, each of which must hold the coordinates field specifying geographical coordinates of a marker. Additionally, you need to specify the value field (for bubble markers), or the values field (for pie markers), or the url field (for image markers). To display a label for a marker, specify the text field.

For a more comprehensive description of how to provide data for map markers, see the Data for Markers topic.

Show Example:
jQuery

In this example, several markers are displayed on the map. These markers indicate the capitals of ten most populous states in the USA.


                                    

                                    

attributes

Specifies an object with marker attributes.

Type: Object
Default Value: undefined

The object assigned to this option may contain information you find useful. Fields of this object are accessible from code using the attribute(name) method of a map marker.

coordinates

Specifies the location of a map marker in geographical coordinates.

Type: Array
Default Value: undefined

This option accepts an array of two values: the first is the longitude, the second is the latitude of a map marker. You can obtain the coordinates of a map marker from code using the coordinates() method.

NOTE
The coordinates option is mandatory for each object in a marker data source.

text

Specifies a text for the marker label.

Type: String
Default Value: undefined

url

Specifies a URL for a map marker of the image type.

Type: String
Default Value: undefined

If you need to display map markers as images, set the markerSettings | type option to 'image'. After that, specify a URL to the required image for each marker using the url field of the marker data object.

value

Specifies a value for a map marker of the bubble type.

Type: Number
Default Value: undefined

When you use markers of the bubble type on your map, specify the value option for each marker. This option defines the size of the bubble that represents a marker: the greater the value, the bigger the size. Additionally, you can specify the sizes of the bubbles with minimum and maximum values. For this purpose, use the minSize and maxSize options of the markerSettings configuration object.

values

Specifies values for a map marker of the pie type.

Type: Array
Default Value: undefined

When you use pie markers on your map, each marker is represented by a tiny pie chart whose slices are defined by the array assigned to the values field of the marker object. If you are not satisfied with the size of pie markers, you can change it using the size option of the markerSettings object.