A canvas implementation of the GeoMap component, should be used used when you have complex geometries as it offers better performance than its SVG counterpart.
Please note that because the features file is pretty huge, it's not included
in the generated code, you can find the file used for this example
here,
you'll have to pass the features
array to the features
property.
The responsive alternative of this component is ResponsiveGeoMap
.
Chart width.
Chart height.
'Depends on device'
Adjust pixel ratio, useful for HiDPI screens.
Chart margin.
'mercator'
Defines the projection to use.
100
Projection scale.
0.5
, 0.5
][0.5
, 0.5
]
Projection x/y translation.
0
, 0
, 0
][0
, 0
, 0
]
Projection rotation.
Define style for common elements such as labels, axes…
0
Control border width.
'#000000'
#333333
Method to compute border color.
Define patterns and gradients.
Define rules to apply patterns and gradients
false
Enable meridians and parallels, useful for showing projection distortion.
0.5
Control meridians and parallel lines width.
'#999999'
#666666
Control meridians and parallel lines color.
true
Enable/disable interactivity.
onClick handler, it receives clicked node data and style plus mouse event.