How to use the @nextgis/webmap.decorators function in @nextgis/webmap

To help you get started, we’ve selected a few @nextgis/webmap 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-map / src / NgwMap.ts View on Github external
* const ngwMap = new NgwMap(new MapAdapter(), {
 *   target: 'map',
 *   qmsId: 487,
 *   baseUrl: 'https://demo.nextgis.com',
 *   webmapId: 3985
 * });
 * ```
 */
export class NgwMap extends WebMap {
  static utils = {
    ...WebMap.utils,
    ...NgwKit.utils,
    fixUrlStr,
    deepmerge
  };
  static decorators = { onMapLoad, ...WebMap.decorators };
  static getIcon = getIcon;

  readonly emitter: StrictEventEmitter = new EventEmitter();

  options: NgwMapOptions & O = {} as NgwMapOptions & O;
  connector!: NgwConnector;

  protected _ngwLayers: NgwLayers = {};
  private __selectFromNgwRaster?: (ev: MapClickEvent) => void;
  private __selectFromNgwVector?: (ev: OnLayerClickOptions) => void;

  /**
   * @param mapAdapter #noapi
   * @param options
   */
  constructor(mapAdapter: MapAdapter, options: NgwMapOptions & O) {

@nextgis/webmap

Universal map constructor

MIT
Latest version published 20 days ago

Package Health Score

69 / 100
Full package analysis