Skip to content

geovisto/geovisto-selection

Repository files navigation

Geovisto Selection Tool

Extension of the Geovisto core library which provides support for selection and highlighting of map layers items.

This repository is a snapshot of Geovisto tools/selection derived from the development repository: geovisto/geovisto-map.

Usage

sample

import { GeovistoSelectionTool } from 'geovisto-selection';

// create instance of map with given props
const map = Geovisto.createMap({
  // ...
  tools?: Geovisto.createMapToolsManager([
    // instances of Geovisto tools (extensions) which will be directly used in the map
    // ...
    GeovistoSelectionTool.createTool({
        id: "geovisto-tool-selection"
    }),
  ])
});

// rendering of the map
map.draw(Geovisto.getMapConfigManagerFactory().default({
  // initial settings of the map can be overriden by the map config - JSON structure providing user settings 
  // ...
  tools?: [
    // config of Geovisto tools (extensions) used in the map
    {
      "type": "geovisto-tool-selection",
      "id": "geovisto-tool-selection",
      "enabled": true,
      "selection": {
        "tool": "geovisto-tool-layer-choropleth", // id of the tool containing the selected item
        "ids": [
          "CZE" // IDs of selected items
        ]
      }
    },
  ]
}));

Installation

npm install --save geovisto-selection

Peer dependencies:

npm install --save geovisto leaflet

This package serves as an extension of Geovisto core using the API for Geovisto tools (extensions). Follow Geovisto core on Github.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published