NextGIS Frontend
    Preparing search index...

    Module @nextgis/ngw-leaflet

    NgwLeaflet

    size version

    Ready-to-use Leaflet-based map for NextGIS Web.

    This package configures the Leaflet map adapter and includes its styles and marker images. Its default export extends NgwMap, so the common APIs from @nextgis/ngw-map and @nextgis/webmap are available on the map instance.

    Simply download and include with a script tag, NgwLeaflet and NgwMap will be registered as a global variable.

    <script src="../lib/ngw-leaflet.global.js"></script>

    <div id='map'></div>
    <script>
    // var ngwMap = new NgwMap({
    var ngwMap = new NgwLeaflet({
    baseUrl: 'https://demo.nextgis.com',
    target: 'map',
    qmsId: 448,
    webmapId: 3985
    });
    </script>

    unpkg

    <script src="https://unpkg.com/@nextgis/ngw-leaflet"></script>
    

    jsdelivr

    <script src="https://cdn.jsdelivr.net/npm/@nextgis/ngw-leaflet"></script>
    

    We recommend linking to a specific version number /ngw-leaflet@[version]

    <script type="module">
    import NgwMap from 'https://cdn.jsdelivr.net/npm/@nextgis/ngw-leaflet@VERSION/lib/ngw-leaflet.esm-browser.prod.js';

    const ngwMap = await NgwMap.create({
    baseUrl: 'https://demo.nextgis.com',
    target: 'map',
    resources: [{ resource: 2011, fit: true }],
    });
    </script>
    npm install leaflet @nextgis/ngw-leaflet
    
    import NgwMap from '@nextgis/ngw-leaflet';

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

    Use new NgwMap(options) when the instance is needed before initialization is complete. Use NgwMap.create(options) when subsequent code requires a ready map.

    TypeScript users should generate declarations for the NextGIS Web deployment used by the application:

    npx @nextgis/ngw-types-loader https://your-ngw-server.com
    

    Check out the API Documentation and the package architecture guide.

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

    http://nextgis.com

    default
    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