The library that allows to use a single interface for managing various interactive map frameworks.
The following adapters are available: @nextgis/leaflet-map-adapter, @nextgis/ol-map-adapter, @nextgis/mapbox-map-adapter and experimental @nextgis/cesium-map-adapter.
import { WebMap } from "@nextgis/webmap";import "./leaflet-style-override.css";import MapAdapter from "@nextgis/leaflet-map-adapter";// OR// import 'ol/ol.css';// import MapAdapter from '@nextgis/ol-map-adapter';// OR// import 'maplibre-gl/dist/maplibre-gl.css';// import MapAdapter from '@nextgis/mapboxgl-map-adapter';const webMap = new WebMap({ mapAdapter: new MapAdapter(), target: 'map',});console.log(!!webMap.mapAdapter.map); // falsewebMap.onLoad().then(() => { console.log(webMap.mapAdapter.map); // true webMap.addLayer('GEOJSON').then((layer) => { webMap.setLayerData(layer, geojson) });});
Generated using TypeDoc
The library that allows to use a single interface for managing various interactive map frameworks.
Remarks
The following adapters are available: @nextgis/leaflet-map-adapter, @nextgis/ol-map-adapter, @nextgis/mapbox-map-adapter and experimental @nextgis/cesium-map-adapter.
Example