Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
connector
);
}
} else {
adapter = createGeoJsonAdapter(_options, webMap, connector);
}
} else if (item.resource.cls === 'raster_layer') {
return createAdapterFromFirstStyle(
item.resource.id,
_options,
webMap,
baseUrl,
connector
);
} else if (item.basemap_layer && item.basemap_layer.qms) {
adapter = Promise.resolve(QmsKit.utils.createQmsAdapter(webMap));
adapter.then(x => {
if (x && item && item.basemap_layer && item.basemap_layer.qms) {
const qms = JSON.parse(item.basemap_layer.qms);
x.prototype.qms = qms;
x.prototype.baseLayer = true;
}
});
}
} else {
throw new Error(
"Can't add NGW layer because Resource item is not found"
);
}
}
} catch (er) {
// if (options.adapter === 'GEOJSON') {