removed leaflet code

pull/33/head
Chris Veilleux 2018-12-20 14:18:59 -06:00
parent 9a2536ba68
commit 63e54ecf79
2 changed files with 1 additions and 29 deletions

View File

@ -1,39 +1,13 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { icon, latLng, marker, tileLayer } from 'leaflet';
import { LatLng, Marker } from 'leaflet';
const streetMaps = tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
detectRetina: true,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
});
const markerIcon = icon({
iconSize: [ 25, 41 ],
iconAnchor: [ 13, 41 ],
iconUrl: 'leaflet/marker-icon.png',
shadowUrl: 'leaflet/marker-shadow.png'
});
@Component({ @Component({
selector: 'account-personal', selector: 'account-personal',
templateUrl: './personal.component.html', templateUrl: './personal.component.html',
styleUrls: ['./personal.component.scss'] styleUrls: ['./personal.component.scss']
}) })
export class PersonalComponent implements OnInit { export class PersonalComponent implements OnInit {
// Default user location to the Kansas City office for users that have not specified
public userLocation: Marker = marker([ 39.0572, -94.5825 ], { draggable: true, icon: markerIcon });
public userCoordinate: LatLng;
public leafletOptions = {
layers: [ streetMaps, this.userLocation ],
zoom: 7,
center: latLng([ 39.1139, -94.5284 ])
};
constructor() { } constructor() { }
ngOnInit() { ngOnInit() { }
this.userLocation.on('dragend', () => { this.userCoordinate = this.userLocation.getLatLng(); });
// this.leafletOptions.layers.push(this.userLocation);
}
} }

View File

@ -1,7 +1,6 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FlexLayoutModule } from '@angular/flex-layout'; import { FlexLayoutModule } from '@angular/flex-layout';
import { LeafletModule } from '@asymmetrik/ngx-leaflet';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { import {
@ -40,7 +39,6 @@ import { AgreementsComponent } from './agreements/agreements.component';
CommonModule, CommonModule,
FlexLayoutModule, FlexLayoutModule,
FontAwesomeModule, FontAwesomeModule,
LeafletModule,
MatButtonModule, MatButtonModule,
MatButtonToggleModule, MatButtonToggleModule,
MatCardModule, MatCardModule,