map |
String
|
Name of the map in the format territory_proj_lang where territory is a unique code or name of the territory which the map represents (ISO 3166 alpha 2 standard is used where possible), proj is a name of projection used to generate representation of the map on the plane (projections are named according to the conventions of proj4 utility) and lang is a code of the language, used for the names of regions. |
backgroundColor |
String
|
Background color of the map in CSS format. |
zoomOnScroll |
Boolean
|
When set to true map could be zoomed using mouse scroll. Default value is true. |
zoomMax |
Number
|
Indicates the maximum zoom ratio which could be reached zooming the map. Default value is 8. |
zoomMin |
Number
|
Indicates the minimum zoom ratio which could be reached zooming the map. Default value is 1. |
zoomStep |
Number
|
Indicates the multiplier used to zoom map with +/- buttons. Default value is 1.6. |
regionsSelectable |
Boolean
|
When set to true regions of the map could be selected. Default value is false. |
regionsSelectableOne |
Boolean
|
Allow only one region to be selected at the moment. Default value is false. |
markersSelectable |
Boolean
|
When set to true markers on the map could be selected. Default value is false. |
markersSelectableOne |
Boolean
|
Allow only one marker to be selected at the moment. Default value is false. |
regionStyle |
Object
|
Set the styles for the map's regions. Each region or marker has four states: initial (default state), hover (when the mouse cursor is over the region or marker), selected (when region or marker is selected), selectedHover (when the mouse cursor is over the region or marker and it's selected simultaneously). Styles could be set for each of this states. Default value for that parameter is:
{
initial: {
fill: 'white',
"fill-opacity": 1,
stroke: 'none',
"stroke-width": 0,
"stroke-opacity": 1
},
hover: {
"fill-opacity": 0.8
},
selected: {
fill: 'yellow'
},
selectedHover: {
}
} |
markerStyle |
Object
|
Set the styles for the map's markers. Any parameter suitable for regionStyle could be used as well as numeric parameter r to set the marker's radius. Default value for that parameter is:
{
initial: {
fill: 'grey',
stroke: '#505050',
"fill-opacity": 1,
"stroke-width": 1,
"stroke-opacity": 1,
r: 5
},
hover: {
stroke: 'black',
"stroke-width": 2
},
selected: {
fill: 'blue'
},
selectedHover: {
}
} |
markers |
Object
|
Array
|
Set of markers to add to the map during initialization. In case of array is provided, codes of markers will be set as string representations of array indexes. Each marker is represented by latLng (array of two numeric values), name (string which will be show on marker's label) and any marker styles. |
series |
Object
|
Object with two keys: markers and regions. Each of which is an array of series configs to be applied to the respective map elements. See DataSeries description for a list of parameters available. |
focusOn |
Object
|
String
|
This parameter sets the initial position and scale of the map viewport. It could be expressed as a string representing region which should be in focus or an object representing coordinates and scale to set. For example to focus on the center of the map at the double scale you can provide the following value:
{
x: 0.5,
y: 0.5,
scale: 2
} |
selectedRegions |
Array
|
Object
|
String
|
Set initially selected regions. |
selectedMarkers |
Array
|
Object
|
String
|
Set initially selected markers. |
onRegionLabelShow |
Function
|
(Event e, Object label, String code) Will be called right before the region label is going to be shown. |
onRegionOver |
Function
|
(Event e, String code) Will be called on region mouse over event. |
onRegionOut |
Function
|
(Event e, String code) Will be called on region mouse out event. |
onRegionClick |
Function
|
(Event e, String code) Will be called on region click event. |
onRegionSelected |
Function
|
(Event e, String code, Boolean isSelected, Array selectedRegions) Will be called when region is (de)selected. isSelected parameter of the callback indicates whether region is selected or not. selectedRegions contains codes of all currently selected regions. |
onMarkerLabelShow |
Function
|
(Event e, Object label, String code) Will be called right before the marker label is going to be shown. |
onMarkerOver |
Function
|
(Event e, String code) Will be called on marker mouse over event. |
onMarkerOut |
Function
|
(Event e, String code) Will be called on marker mouse out event. |
onMarkerClick |
Function
|
(Event e, String code) Will be called on marker click event. |
onMarkerSelected |
Function
|
(Event e, String code, Boolean isSelected, Array selectedMarkers) Will be called when marker is (de)selected. isSelected parameter of the callback indicates whether marker is selected or not. selectedMarkers contains codes of all currently selected markers. |
onViewportChange |
Function
|
(Event e, Number scale) Triggered when the map's viewport is changed (map was panned or zoomed). |