NextGIS Frontend
    Preparing search index...

    Module @nextgis/ngw-kit

    NgwKit

    size version

    NextGIS Web integration for @nextgis/webmap, including resource adapters, feature requests, identification, extents, legends, and other map-related utilities.

    Applications using ngw-leaflet, ngw-ol, or ngw-maplibre-gl already use this package through NgwMap. Import ngw-kit directly when a utility is not available as an NgwMap convenience method or when assembling a custom map stack.

    Make sure CORS is registered in the NextGIS Web settings to be able to send requests.

    npm install @nextgis/ngw-kit
    
    import { NgwKit } from '@nextgis/ngw-kit';
    import { createWebMap } from '@nextgis/webmap';
    import LeafletMapAdapter from '@nextgis/leaflet-map-adapter';

    import 'leaflet/dist/leaflet.css';

    const webMap = await createWebMap({
    target: 'map',
    mapAdapter: new LeafletMapAdapter(),
    starterKits: [
    new NgwKit({
    baseUrl: 'https://demo.nextgis.com',
    resourceId: 3985,
    }),
    ],
    });

    For end-user applications, prefer a ready-to-use ngw-* map package instead of assembling this stack manually.

    import { fetchNgwLayerItems } from '@nextgis/ngw-kit';
    import NgwConnector from '@nextgis/ngw-connector';

    const connector = new NgwConnector({
    baseUrl: 'https://demo.nextgis.com',
    });

    const items = await fetchNgwLayerItems({
    connector,
    resourceId: 2011,
    offset: 10,
    limit: 300,
    fields: ['name', 'year'],
    orderBy: ['year'],
    });

    The package also exports helpers for resource extents, feature counts, identification results, field conversion, attachments, legends, and NextGIS Web layer adapter creation. See the generated API documentation for the full exported surface.

    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-kit? We provide custom development and support for this software. Contact us to discuss options!

    http://nextgis.com

    BookmarkItem
    IdentifyItem
    Legend
    NgwKit
    NgwResource
    NgwWebmapItem
    NgwWebmapLayerAdapter
    AppSettings
    CompanyLogoOptions
    ExtendNgwWebmapLayerAdapterOptions
    FeatureIdentifyRequestOptions
    FeatureLayerIdentifyOptions
    FetchNgwLayerCountOptions
    FetchNgwLayerExtentOptions
    FetchNgwLayerItemExtentOptions
    FetchNgwResourceExtent
    GetClassAdapterOptions
    GetIdentifyGeoJsonOptions
    GetImageAdapterOptionsParams
    GetLayerAdapterOptions
    GetNgwItemOptions
    GetNgwItemsOptions
    IdentifyEvent
    IdentifyItemOptions
    IdentifyRequestOptions
    MapFeatureDisplayNameOptions
    MapSelectNgwLayerDistinctOptions
    NgwConfig
    NgwFeatureItemResponse
    NgwFeatureRequestOptions
    NgwGeoJsonAdapterEvents
    NgwIdentifyItem
    NgwKitOptions
    NgwLayerOptions
    NgwWebmapAdapterOptions
    NgwWebmapItemOptions
    NgwWebmapLayerAdapterEvents
    ResourceAdapter
    TreeGroup
    TreeLayer
    TreeRoot
    UploadFeatureAttachmentOptions
    ClassAdapter
    FeatureRequestParams
    FetchNgwItemOptions
    FetchNgwItemsOptions
    GeomFormat
    GetClassAdapter
    GetClassAdapterByType
    GetClassAdapterCallback
    LegendSymbols
    NgwGeoJsonLayerAdapter
    NgwGeoJsonLayerOptions
    NgwIdentify
    NgwLayerAdapterType
    NgwRequestOptions
    PropertiesForNgwFilter
    ResourceIdDef
    ResourceNgwLayerOptions
    TileNoData
    TreeChildItem
    TreeItem
    VectorResourceAdapter
    FEATURE_REQUEST_PARAMS
    vectorLayerGeomToPaintTypeAlias
    WEBMAP_BASELAYER_ID_PREFIX
    addFeatureAttachment
    addNgwLayer
    createGeoJsonAdapter
    createGeoJsonFeature
    createIdentifyItem
    createLayerSymbolParam
    createNgwLayerAdapter
    createOnFirstShowAdapter
    createOnFirstShowNgwAdapter
    createPopupContent
    createRasterAdapter
    deleteFeatureAttachment
    extendNgwWebmapLayerAdapter
    featureLayerIdentify
    fetchIdentifyGeoJson
    fetchIdentifyItem
    fetchNgwExtent
    fetchNgwLayerCount
    fetchNgwLayerExtent
    fetchNgwLayerFeature
    fetchNgwLayerFeatureCollection
    fetchNgwLayerFeatures
    fetchNgwLayerItem
    fetchNgwLayerItemExtent
    fetchNgwLayerItems
    fetchNgwLayerItemsRequest
    fetchNgwResourceExtent
    getIdentifyGeoJson
    getIdentifyItems
    getImageAdapterOptions
    getLayerAdapterOptions
    getMapWidthForLanInMeters
    getNgwWebmapExtent
    getZoomFromScale
    mapFeatureDisplayName
    ngwApiToAdapterOptions
    parseDate
    parseDateFromNgw
    pixelsInMeterWidth
    prepareFieldsToNgw
    prepareNgwFieldsToPropertiesFilter
    resourceIdFromLayerOptions
    selectNgwLayerDistinct
    sendIdentifyRequest
    setScaleRatio
    updateImageParams
    updateItemRequestParam
    uploadFeatureAttachment