How to use @nextgis/ol-map-adapter - 2 common examples

To help you get started, we’ve selected a few @nextgis/ol-map-adapter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nextgis / nextgisweb_frontend / packages / ol-map-adapter / examples / main.js View on Github external
import { OlMapAdapter } from '@nextgis/ol-map-adapter';
import { NgwKit } from '@nextgis/ngw-kit';
import { QmsKit } from '@nextgis/qms-kit';

const ngwKit = new NgwKit({
  'baseUrl': "http://geonote.nextgis.com",
  'resourceId': 1,
  // 'pixelRadius': 10,
  // auth: {
  //   login: 'administrator',
  //   password: '',
  // }
})

const webMap = new WebMap({
  mapAdapter: new OlMapAdapter(),
  starterKits: [new QmsKit(), ngwKit],
});

webMap.create({
  target: 'map'
}).then(() => {
  webMap.addControl('ZOOM', 'top-left');
  webMap.addBaseLayer('sputnik', 'QMS', {
    qmsid: 487
  }).then((layer) => {
    webMap.showLayer(layer.name);
  });
});

// webMap.addBaseLayer('osm', 'OSM').then((layer) => {
//   webMap.showLayer(layer.name);
github nextgis / nextgisweb_frontend / packages / ngw-ol / src / index.ts View on Github external
constructor(options: NgwMapOptions) {
    super(new OlMapAdapter(), options);
  }

@nextgis/ol-map-adapter

![size](https://img.shields.io/bundlephobia/minzip/@nextgis/ol-map-adapter) ![version](https://img.shields.io/npm/v/@nextgis/ol-map-adapter)

MIT
Latest version published 10 days ago

Package Health Score

69 / 100
Full package analysis

Popular @nextgis/ol-map-adapter functions