npm.io
4.1.1 • Published 1 week ago

@nextgis/qms-kit

Licence
MIT
Version
4.1.1
Deps
3
Size
160 kB
Vulns
0
Weekly
0
Stars
31

Qms kit

version

Register NextGIS QMS TMS and WMS services as baselayers in @nextgis/webmap.

This is a developer package for libraries built on the common WebMap API. Use qms-leaflet, qms-ol, or qms-maplibre-gl when working with an existing native map.

Installation

npm install @nextgis/qms-kit @nextgis/webmap

Usage

Use as a WebMap starter kit
import { createWebMap } from '@nextgis/webmap';
import { QmsKit } from '@nextgis/qms-kit';
import LeafletMapAdapter from '@nextgis/leaflet-map-adapter';
import 'leaflet/dist/leaflet.css';

const webMap = await createWebMap({
  target: 'map',
  mapAdapter: new LeafletMapAdapter(),
  starterKits: [new QmsKit()],
});

await webMap.addBaseLayer('QMS', { qmsId: 448 });
Register the adapter directly
import { createWebMap } from '@nextgis/webmap';
import { createQmsAdapter } from '@nextgis/qms-kit';
import LeafletMapAdapter from '@nextgis/leaflet-map-adapter';
import 'leaflet/dist/leaflet.css';

const webMap = await createWebMap({
  target: 'map',
  mapAdapter: new LeafletMapAdapter(),
});

const QmsAdapter = createQmsAdapter({ webMap, qmsId: 448 });
await webMap.addBaseLayer(QmsAdapter);

See the API Documentation and the package architecture guide.

http://nextgis.com

Keywords