@@ -9,13 +9,7 @@ import { filter, map, tap } from 'rxjs/operators';
99import { BehaviorSubject , Observable } from 'rxjs' ;
1010import { TranslateService } from '@ngx-translate/core' ;
1111import { isNotEmpty } from '../empty.util' ;
12- import { latLng , LatLng , Layer , MapOptions , marker , tileLayer } from 'leaflet' ;
13-
14-
15- export interface OpenStreetMapPointer {
16- coordinates : LocationDDCoordinates ,
17- color : string ,
18- }
12+ import { icon , latLng , LatLng , Layer , MapOptions , marker , tileLayer } from 'leaflet' ;
1913
2014@Component ( {
2115 selector : 'ds-open-street-map' ,
@@ -24,9 +18,6 @@ export interface OpenStreetMapPointer {
2418} )
2519export class OpenStreetMapComponent implements OnInit {
2620
27- // Spacial reference identifier
28- SRID = 'EPSG:4326' ; // World Geodetic System 1984
29-
3021 /**
3122 * The width of the map
3223 */
@@ -175,7 +166,6 @@ export class OpenStreetMapComponent implements OnInit {
175166
176167 this . locationService . findPlaceAndDecimalCoordinates ( position ) . subscribe ( {
177168 next : ( place ) => {
178- console . log ( 'PLACE' , place ) ;
179169 this . place . next ( place ) ;
180170 } ,
181171 error : ( err ) => {
@@ -214,7 +204,9 @@ export class OpenStreetMapComponent implements OnInit {
214204 this . leafletCenter = latLng ( + coordinates . latitude , + coordinates . longitude ) ;
215205 this . leafletLayers = [
216206 tileLayer ( 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' , { maxZoom : 18 , attribution : 'Leaflet' } ) ,
217- marker ( [ + coordinates . latitude , + coordinates . longitude ] )
207+ marker (
208+ [ + coordinates . latitude , + coordinates . longitude ] ,
209+ { icon : icon ( { iconUrl : 'assets/images/marker-icon.png' , shadowUrl : 'assets/images/marker-shadow.png' } ) } )
218210 ] ;
219211 }
220212}
0 commit comments