NextGIS Frontend
    Preparing search index...

    Module @nextgis/ngw-map

    NgwMap

    size version

    Framework-independent NextGIS Web map class used by ngw-leaflet, ngw-ol, and ngw-maplibre-gl.

    Most applications should import one of those ready-to-use packages. Use @nextgis/ngw-map directly when creating another map distribution, injecting a custom map adapter, or extending the common NextGIS Web behavior.

    NgwMap extends WebMap, adds an NgwConnector, and provides NextGIS Web resources, feature requests, identification, selection, and extent operations. It also re-exports the public @nextgis/webmap API.

    npm install @nextgis/ngw-map @nextgis/leaflet-map-adapter leaflet
    
    import { NgwMap } from '@nextgis/ngw-map';
    import MapAdapter from '@nextgis/leaflet-map-adapter';
    import 'leaflet/dist/leaflet.css';

    const ngwMap = new NgwMap({
    mapAdapter: new MapAdapter(),
    baseUrl: 'https://demo.nextgis.com',
    target: 'map',
    qmsId: 448,
    webmapId: 3985,
    });

    await ngwMap.onLoad();

    The map adapter is required when this package is used directly. The ready-to-use map packages create it automatically.

    Important inherited API groups include:

    • NextGIS Web resources: addNgwLayer(), fitResource(), and connector;
    • features and identification: fetchNgwLayerItems(), fetchIdentifyGeoJson(), and ngw:select events;
    • common WebMap layers, controls, events, filtering, and view methods.

    See the API Documentation and the package architecture guide.

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

    http://nextgis.com

    NgwMap
    WebMap
    WebMapControls
    WebMapLayers
    WebMapMain
    AdapterOptions
    AddControlOptions
    AttributionControlOptions
    ButtonControlOptions
    ContribControlsOptions
    ControlOptions
    CreateControlOptions
    CreatePopupContentProps
    DataLoadError
    FeaturePosition
    FilterOptions
    FitOptions
    GeoJsonAdapterOptions
    GeoJsonLayerAdapter
    GetAttributionsOptions
    GetLegendOptions
    HtmlToggle
    ImageAdapterOptions
    LayerAdapterCreators
    LayerAdapters
    LayerAdaptersOptions
    LayerDefinition
    LayerRequestOptions
    Locate
    LocateOptions
    LocationEvent
    LocationEvents
    MainLayerAdapter
    MainMapEvents
    MapAdapter
    MapAdapterEvents
    MapClickEvent
    MapControl
    MapControls
    MapOptions
    Model3DOptions
    MvtAdapterOptions
    NgwLayers
    NgwLayersMem
    NgwMapEvents
    NgwMapOptions
    OnLayerClickOptions
    OnLayerMouseOptions
    OnLayerSelectOptions
    Pixel
    PopupOptions
    RasterAdapterOptions
    RuntimeParams
    StarterKit
    TileAdapterOptions
    Tileset3DAdapterOptions
    TitleToggle
    ToggleControl
    ToggleControlOptions
    ToggleLayerOptions
    UpdateLayerAdapterOptions
    VectorAdapterOptions
    VectorLayerAdapter
    ViewOptions
    WebMapEvents
    WmsAdapterOptions
    ZoomControlOptions
    AdapterConstructor
    CallbackFilter
    ControlPosition
    ControlPositions
    ControlsOptions
    ControlTargetPosition
    CreatePopupContent
    Cursor
    DataLayerFilter
    FeatureLayerAdapter
    GeoJsonAdapterFeature
    HtmlDef
    LayerAdapter
    LayerAdapterDefinition
    LayerDef
    NgwIdentifyEvent
    NgwResourceDefinition
    OnBeforeLayerAdd
    OnLayerSelectType
    PopupOnCloseFunction
    ToggleStatusChangeListener
    VectorAdapterLayerType
    paintTypeAlias
    typeAlias
    applyLayerRequestOptions
    createNgwMap
    createToggleControl
    createWebMap
    detectGeometryType
    findMostFrequentGeomType
    getDefaultControls
    getLayerRequestOptions
    getWebMap
    normalizeLayerRequestOptions
    setWebMap
    updateGeoJsonAdapterOptions