geovisto-layer-marker
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Geovisto Marker Layer Tool

Extension of the Geovisto core library which provides the marker layer.

This repository is a snapshot of Geoviosto tools/layers/marker derived from the development repository: geovisto/geovisto-map.

sample

Usage

import { GeovistoMarkerLayerTool } from 'geovisto-layer-marker';
import 'geovisto-layer-marker/dist/index.css';

// 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
    // ...
    GeovistoMarkerLayerTool.createTool({
      id: "geovisto-tool-layer-marker"
      dimensions?: ...; // provide instance of IMarkerLayerToolDimensions to override dimensions
      geoData?: ...; // provide instance of IGeoDataManager to override geographical data manager
    }),
  ])
});

// 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-layer-marker",
      "id": "geovisto-tool-layer-marker",
      "enabled?": true,
      // mapping of data domains to data dimensions
      "data": {
        "geoData": "world centroids", // geo data id
        "geoId": "to", // data domain
        "value": "value", // data domain
        "aggregation": "sum", // [ "sum", "count" ]
        "category": "state" // data domain
        "units": "$", // units shortcut
        "unitsDesc": "US Dollars", // units label
        "round": 1 // rounding
      }
    },
  ]
}));

Installation

npm install --save geovisto-layer-marker

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.01latest

Version History

VersionDownloads (Last 7 Days)Published
2.0.01
1.0.10
1.0.00

Package Sidebar

Install

npm i geovisto-layer-marker

Weekly Downloads

1

Version

2.0.0

License

MIT

Unpacked Size

1.55 MB

Total Files

31

Last publish

Collaborators

  • jiri.hynek