Added bing maps
This commit is contained in:
@ -6,6 +6,7 @@ import {Circle, LatLng, MapSymbol, Marker, Measurement, Polygon, Polyline, Recta
|
||||
declare const L;
|
||||
|
||||
export enum MapLayers {
|
||||
BING,
|
||||
ESRI_TOPOGRAPHIC,
|
||||
ESRI_IMAGERY,
|
||||
ESRI_IMAGERY_CLARITY
|
||||
@ -155,8 +156,11 @@ export class MapService {
|
||||
|
||||
setMapLayer(layer?: MapLayers) {
|
||||
if(this.mapLayer) this.map.removeLayer(this.mapLayer);
|
||||
if(layer == null) layer = MapLayers.ESRI_IMAGERY;
|
||||
if(layer == null) layer = MapLayers.BING;
|
||||
switch(layer) {
|
||||
case MapLayers.BING:
|
||||
this.mapLayer = L.tileLayer.bing(environment.bing);
|
||||
break;
|
||||
case MapLayers.ESRI_TOPOGRAPHIC:
|
||||
this.mapLayer = L.esri.basemapLayer('Topographic');
|
||||
break;
|
||||
|
@ -55,9 +55,10 @@ export class MapComponent implements OnDestroy, OnInit {
|
||||
{name: 'Place Relative', icon: 'control_camera', click: this.placeRelative},
|
||||
{name: 'Delete', icon: 'delete', toggle: true, onEnabled: this.startDelete, onDisabled: this.unsub},
|
||||
{name: 'Map Style', icon: 'terrain', subMenu: [
|
||||
{name: 'Bing:Satellite', toggle: true, enabled: true, click: () => this.map.setMapLayer(MapLayers.BING)},
|
||||
{name: 'ESRI:Topographic', toggle: true, click: () => this.map.setMapLayer(MapLayers.ESRI_TOPOGRAPHIC)},
|
||||
{name: 'ESRI:Satellite', toggle: true, click: () => this.map.setMapLayer(MapLayers.ESRI_IMAGERY)},
|
||||
{name: 'ESRI:Satellite Clear', toggle: true, enabled: true, click: () => this.map.setMapLayer(MapLayers.ESRI_IMAGERY_CLARITY)}
|
||||
{name: 'ESRI:Satellite Clear', toggle: true, click: () => this.map.setMapLayer(MapLayers.ESRI_IMAGERY_CLARITY)}
|
||||
]},
|
||||
{name: 'Weather', icon: 'cloud', subMenu: [
|
||||
{name: 'None', toggle: true, enabled: true, click: () => this.map.setWeatherLayer()},
|
||||
|
@ -1,4 +1,5 @@
|
||||
export const environment = {
|
||||
bing: 'Ah3zXeKgjcCebkqxGBZ4zROLJ_NJm7djhArju4--__5Jg9p19VgCtPkLmv-FxS_C',
|
||||
firebaseConfig: {
|
||||
apiKey: "AIzaSyDFtvCY6nH_HUoTBNf_5b-E8nRweSLYtxE",
|
||||
authDomain: "mapalliance-ab38a.firebaseapp.com",
|
||||
|
@ -3,6 +3,7 @@
|
||||
// The list of file replacements can be found in `angular.json`.
|
||||
|
||||
export const environment = {
|
||||
bing: 'Ah3zXeKgjcCebkqxGBZ4zROLJ_NJm7djhArju4--__5Jg9p19VgCtPkLmv-FxS_C',
|
||||
firebaseConfig: {
|
||||
apiKey: "AIzaSyDFtvCY6nH_HUoTBNf_5b-E8nRweSLYtxE",
|
||||
authDomain: "mapalliance-ab38a.firebaseapp.com",
|
||||
|
Reference in New Issue
Block a user