-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
109 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<map #map zoom="2" longitude="-19.71" latitude="32.63"> | ||
|
||
</map> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
div { | ||
height: 100%; | ||
width: 100%; | ||
overflow: auto; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div> | ||
<ng-content></ng-content> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { Component, ElementRef, Input } from '@angular/core'; | ||
import { MapService } from './map.service'; | ||
import Map from 'esri/Map'; | ||
import MapView from 'esri/views/MapView'; | ||
|
||
declare const __moduleName: string; | ||
|
||
@Component ({ | ||
moduleId: __moduleName, | ||
selector: 'map', | ||
templateUrl: 'map.component.html', | ||
styleUrls: ['map.component.css'] | ||
}) | ||
|
||
export class MapComponent { | ||
@Input() zoom: number; | ||
@Input() longitude: number; | ||
@Input() latitude: number; | ||
|
||
view: any = null; | ||
|
||
constructor( | ||
private _mapService: MapService, | ||
private elRef: ElementRef | ||
) {} | ||
|
||
ngOnInit() { | ||
this.view = new MapView({ | ||
container: this.elRef.nativeElement.firstChild, | ||
map: this._mapService.map, | ||
zoom: this.zoom, | ||
center: [this.longitude, this.latitude], | ||
}); | ||
|
||
this.view.ui.move('zoom', 'bottom-right'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Injectable } from '@angular/core'; | ||
import Map from 'esri/Map'; | ||
|
||
@Injectable() | ||
|
||
export class MapService { | ||
|
||
map: any = null; | ||
|
||
constructor() { | ||
this.map = new Map({ | ||
basemap: 'dark-gray-vector', | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
declare const System: any; | ||
declare const esriSystem: any; | ||
|
||
// load Esri modules with the help of esri-system-js library | ||
esriSystem.register([ | ||
'esri/Map', | ||
'esri/views/MapView', | ||
], function() { | ||
// bootstrap the app | ||
System.import('main.js') | ||
.then(null, console.error.bind(console)); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,8 @@ html, body { | |
padding: 0; | ||
overflow: hidden; | ||
} | ||
|
||
.esri-view { | ||
height: 100%; | ||
width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters