Socket
Book a DemoInstallSign in
Socket

geovisto

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geovisto

TypeScript mapping library for generic geospatial data visualization based on Leaflet

2.1.0
latest
npmnpm
Version published
Maintainers
1
Created
Source

Geovisto

TypeScript mapping library for generic geospatial data visualization based on Leaflet.

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

Usage

import {
    Geovisto
} from 'geovisto';
import 'geovisto/dist/index.css';

// ,,,

// create instance of map with given props
const map = Geovisto.createMap({
    id: "my-geovisto-map",
    data: Geovisto.getMapDataManagerFactory().json([
        // list of data records (JSON structures)
        // ...
    ]),
    geoData: Geovisto.getGeoDataManager([
        Geovisto.getGeoDataFactory().geojson("world polygons", {
            // GeoJSON definition
            // ...
        }),
        // other geographic data
        // ...
    ]),
    globals?: { // props of Leaflet-based map
        zoom: number,
        mapCenter: {
            lat: number,
            lng: number
        },
        mapStructure: {
            maxZoom: number,
            maxBounds: [[number, number], [number, number]]
        }
    },
    templates?: Geovisto.createMapToolsManager([
        // instances of Geovisto tools (extensions)
        // these tools will be used as templates if new instance of tool needs to be created in the future
        // ...
    ]),
    tools?: Geovisto.createMapToolsManager([
        // instances of Geovisto tools (extensions) which will be directly used in the map
        // ...
    ])
});

// 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 
  zoom?: number,
  mapCenter?: { lat: number, lng: number },
  mapStructure?: { maxZoom: number, maxBounds: [[ number, number ],[ number, number ]] },
  tools?: [
    // config of Geovisto tools (extensions) used in the map
  ]
}));

// the map can be re-rendered
map.redraw(Geovisto.getMapConfigManagerFactory().default({ /* ... config ... */}), this.getProps([ /* ... data ... */]));

// current state of the map can be exported in the JSON format (map config)
const config = map.export();

Demo

Installation

npm install --save geovisto

Extensions

This package serves as the core of Geovisto providing the API for Geovisto tools (extensions). Follow available Geovisto tools on Github.

License

MIT

Keywords

gis

FAQs

Package last updated on 30 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.