Module webmap

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

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); // false
webMap.onLoad().then(() => {
console.log(webMap.mapAdapter.map); // true

webMap.addLayer('GEOJSON').then((layer) => {
webMap.setLayerData(layer, geojson)
});
});

References

Re-exports AdapterConstructor
Re-exports AdapterOptions
Re-exports AttributionControlOptions
Re-exports ButtonControlOptions
Re-exports CallbackFilter
Re-exports ContribControlsOptions
Re-exports ControlOptions
Re-exports ControlPosition
Re-exports ControlPositions
Re-exports ControlsOptions
Re-exports CreateControlOptions
Re-exports CreatePopupContent
Re-exports CreatePopupContentProps
Re-exports Cursor
Re-exports DataLayerFilter
Re-exports DataLoadError
Re-exports FeatureLayerAdapter
Re-exports FeaturePosition
Re-exports FilterOptions
Re-exports FitOptions
Re-exports GeoJsonAdapterOptions
Re-exports GetAttributionsOptions
Re-exports HtmlDef
Re-exports HtmlToggle
Re-exports ImageAdapterOptions
Re-exports LayerAdapter
Re-exports LayerAdapterCreators
Re-exports LayerAdapterDefinition
Re-exports LayerAdapters
Re-exports LayerAdaptersOptions
Re-exports LayerDef
Re-exports LayerDefinition
Re-exports Locate
Re-exports LocateOptions
Re-exports LocationEvent
Re-exports LocationEvents
Re-exports MainLayerAdapter
Re-exports MainMapEvents
Re-exports MapAdapter
Re-exports MapAdapterEvents
Re-exports MapClickEvent
Re-exports MapControl
Re-exports MapControls
Re-exports MapOptions
Re-exports Model3DOptions
Re-exports MvtAdapterOptions
Re-exports OnBeforeLayerAdd
Re-exports OnClick
Re-exports OnClickSync
Re-exports OnLayerClickOptions
Re-exports OnLayerMouseOptions
Re-exports OnLayerSelectOptions
Re-exports OnLayerSelectType
Re-exports OnToggleClick
Re-exports OnToggleClickSync
Re-exports Pixel
Re-exports PopupOnCloseFunction
Re-exports PopupOptions
Re-exports RasterAdapterOptions
Re-exports RuntimeParams
Re-exports StarterKit
Re-exports TileAdapterOptions
Re-exports Tileset3DAdapterOptions
Re-exports TitleToggle
Re-exports ToggleControl
Re-exports ToggleControlOptions
Re-exports ToggleLayerOptions
Re-exports VectorAdapterLayerType
Re-exports VectorAdapterOptions
Re-exports VectorLayerAdapter
Re-exports ViewOptions
Re-exports WebMap
Re-exports WebMapControls
Re-exports WebMapEvents
Re-exports WebMapLayers
Re-exports WebMapMain
Re-exports WmsAdapterOptions
Re-exports ZoomControlOptions
Re-exports createToggleControl
Re-exports detectGeometryType
Re-exports findMostFrequentGeomType
Re-exports getDefaultControls
Re-exports getWebMap
Re-exports onClickAsync
Re-exports onToggleClickAsync
Re-exports updateGeoJsonAdapterOptions

Generated using TypeDoc