ng-esri-map
TypeScript icon, indicating that this package has built-in type declarations

5.0.0 • Public • Published

NgEsriMap component

npm version npm node Dependency Status License: MIT

Easy to use component which helps to integrate and control ESRI map inside your Angular application

Life example

You can find here

Basic usage

  1. Import NgEsriMapModule inside your Application
  2. Insert map component into template like this:
    <div #myMap="ngEsriMap"
         ngEsriMap
         [ngEsriMapImageLayers]="layers"
    ></div>
  3. Control map inside your component:
    import { Component, ViewChild } from '@angular/core';
    import { EsriMapDirective, Layer } from 'ng-esri-map';
     
    @Component({
      selector: 'my-map',
      templateUrl: './my-map.component.html',
      styleUrls: ['./my-map.component.css']
    })
    export class MyMapComponent {
      public layers: Layer[] = [
        {
          url: 'https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer'
        }
      ];
      @ViewChild('myMap') private myMap: EsriMapDirective;
     
      public ngOnInit() {
        this.myMap.initMap({latitude: 1, longitude: 2});
      }
    }

Advanced usage

You can find an example

Package Sidebar

Install

npm i ng-esri-map

Weekly Downloads

1

Version

5.0.0

License

MIT

Unpacked Size

352 kB

Total Files

67

Last publish

Collaborators

  • l2jliga