How to use the @nextgis/qms-kit.utils function in @nextgis/qms-kit

To help you get started, we’ve selected a few @nextgis/qms-kit 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 / ngw-kit / src / createAsyncAdapter.ts View on Github external
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') {

@nextgis/qms-kit

Build webmap with QuickMapServices

MIT
Latest version published 20 days ago

Package Health Score

69 / 100
Full package analysis

Popular @nextgis/qms-kit functions