This package has been deprecated

Author message:

WARNING: This project has been renamed to angular2-esri4-components. Install using angular2-esri4-components instead.

angular2-esri4-component
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

angular2-esri4-component

An Angular 2 component to create an ESRI map in your applications using ArcGIS API for JavaScript v4.1

Install

npm install --save angular2-esri4-component

Usage

Include Angular2Esri4Module in your main module:

// ...

import { Angular2Esri4Module } from 'angular2-esri4-component';

@NgModule({
  // ...
  imports: [
    Angular2Esri4Module
  ],
  // ...
})
export class AppModule { }

Using the angular2-esri4-component in one of the components of your application:

import { Component, OnInit, ViewChild } from '@angular/core';

import { EsriLoaderService } from 'angular2-esri-loader';
import { Angular2Esri4Component } from 'angular2-esri4-component';

@Component({
  selector: 'app-map',
  template: `
    <angular2-esri4 [mapProperties]="mapProperties" [mapViewProperties]="mapViewProperties" (mapInit)="onMapInit($event)"></angular2-esri4>
  `,
  styleUrls: ['./map.component.scss'],
  providers: [EsriLoaderService]
})
export class MapComponent implements OnInit {
  mapProperties: __esri.MapProperties = {
    basemap: 'dark-gray'
  };
  mapViewProperties: __esri.MapViewProperties = {
    center: [-118, 34.5],
    zoom: 8
  };
  map: __esri.Map;

  @ViewChild(Angular2Esri4Component) esriComponent: Angular2Esri4Component;

  constructor(private esriLoader: EsriLoaderService) { }

  ngOnInit() { }

  onMapInit(map: __esri.Map) {
    this.map = map;
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i angular2-esri4-component

Weekly Downloads

0

Version

1.0.0

License

Apache-2.0

Last publish

Collaborators

  • kgs916