npm.io
4.1.1 • Published 1 week ago

@nextgis/webmap

Licence
MIT
Version
4.1.1
Deps
9
Size
1.9 MB
Vulns
0
Weekly
0
Stars
31

WebMap

version

Framework-independent map engine and adapter contract.

WebMap manages the map lifecycle, layers, controls, events, view state, selection, filtering, and ordering without depending on a particular rendering engine or backend. It is primarily intended for adapter and library authors.

Applications connected to NextGIS Web normally use one of ngw-leaflet, ngw-ol, or ngw-maplibre-gl. Their map classes inherit the API documented by this package through NgwMap.

Installation

npm install @nextgis/webmap @nextgis/leaflet-map-adapter leaflet

Usage

import { createWebMap } from '@nextgis/webmap';
import MapAdapter from '@nextgis/leaflet-map-adapter';
import 'leaflet/dist/leaflet.css';

const webMap = await createWebMap({
  target: 'map',
  mapAdapter: new MapAdapter(),
});

Use this package to implement:

  • common layer operations through WebMapLayers;
  • controls through WebMapControls;
  • lifecycle, events, and view operations through WebMapMain;
  • new MapAdapter and LayerAdapter implementations;
  • starter kits that register controls and layer providers.

Backend-specific behavior, including NextGIS Web requests and resources, does not belong in this package.

See the API Documentation and the package architecture guide.

Commercial support

Need to fix a bug or add a feature to @nextgis/webmap? We provide custom development and support for this software. Contact us to discuss options!

http://nextgis.com

Keywords