Yandex Maps API Regionmap Module
Yandex.Maps API module for data visualization.
Regionmap is a graphical representation of some spatial data, where depending on the number of entered points regions are painted in different colors.
Regionmap
class allows to construct and display such representations over geographical maps.
Loading
-
Put module source code (regionmap.min.js) on your CDN.
-
Load both Yandex Maps JS API 2.1 and module source code by adding following code into <head> section of your page:
<!-- Change my.cdn.tld to your CDN host name -->If you use GeoJSON data:
<!-- Change my.cdn.tld to your CDN host name -->If you use npm:
npm i --save git+https://github.com/yandex-shri-fx-team/ymaps-regionmap.git;// Or with babel; -
Get access to module functions by using ymaps.modules.require method:
ymapsmodules;
Regionmap
Regionmap module.
Requires: module:option.Manager
, module:Polygonmap
- Regionmap
- Regionmap ⏏
- new Regionmap([data], [options])
- .setMap(map) ⇒
Regionmap
- .getMap() ⇒
Map
- Regionmap ⏏
Regionmap ⏏
new Regionmap([data], [options])
Param | Type | Description |
---|---|---|
[data] | Object |
Points, GeoJSON FeatureCollections. |
[options] | Object |
Options for customization. See more options in Polygonmap. |
options.regionOptions | object |
Options for Yandex.Maps API Regions. |
Regionmap
regionmap.setMap(map) ⇒ Set Map instance to render Polygonmap object.
Kind: instance method of Regionmap
Returns: Regionmap
- Self-reference.
Access: public
Param | Type | Description |
---|---|---|
map | Map |
Map instance. |
Map
regionmap.getMap() ⇒ Get the Map instance.
Kind: instance method of Regionmap
Returns: Map
- Reference to Map instance.
Access: public
Examples
Displaying regionmap over geographical map
ymapsmodules;