Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { WebMap } from '@nextgis/webmap';
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) => {