diff --git a/src/app/map/components/map.component.scss b/src/app/map/components/map.component.scss index 3e717886a08c2af224676d62dd093238093c3cc2..765479d97438b5c8ea22185127e5f0f44740f93a 100644 --- a/src/app/map/components/map.component.scss +++ b/src/app/map/components/map.component.scss @@ -69,3 +69,12 @@ display: flex; } } + +::ng-deep .leaflet-left { + right: 0; + left: unset; + .leaflet-control { + margin-left: 0; + margin-right: 10px; + } +} diff --git a/src/app/map/components/map.component.ts b/src/app/map/components/map.component.ts index b03a4052cdf14fbc2af551bf780a92c0c3be31e3..adbca64a595500f5ecc4cb4053f079da817d125f 100644 --- a/src/app/map/components/map.component.ts +++ b/src/app/map/components/map.component.ts @@ -1,5 +1,5 @@ -import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'; -import { latLng, MapOptions, tileLayer, Map, CRS, TileLayer, LatLngBounds, latLngBounds } from 'leaflet'; +import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core'; +import { latLng, MapOptions, tileLayer, Map, CRS, TileLayer, LatLngBounds, latLngBounds, Control } from 'leaflet'; import { Observable } from 'rxjs'; import { mergeMap } from 'rxjs/operators'; import { Structure } from '../../models/structure.model'; @@ -7,6 +7,7 @@ import { GeoJson } from '../models/geojson.model'; import { GeojsonService } from '../../services/geojson.service'; import { MapService } from '../services/map.service'; import { LeafletControlLayersChanges } from '@asymmetrik/ngx-leaflet'; +import { NgxLeafletLocateComponent } from '@runette/ngx-leaflet-locate'; @Component({ selector: 'app-map', @@ -17,6 +18,7 @@ export class MapComponent implements OnChanges { @Input() public structures: Structure[] = []; @Input() public toogleToolTipId: number; @Input() public selectedMarkerId: number; + @ViewChild(NgxLeafletLocateComponent, { static: false }) locateComponent: NgxLeafletLocateComponent; public map: Map; public mapOptions: MapOptions; // Init locate options diff --git a/src/app/structure-list/components/card/card.component.ts b/src/app/structure-list/components/card/card.component.ts index 6c8706c2defd036577ca4843fc24075d91f4054b..606792875af39008d3a77bc61e70629a8033b796 100644 --- a/src/app/structure-list/components/card/card.component.ts +++ b/src/app/structure-list/components/card/card.component.ts @@ -41,7 +41,7 @@ export class CardComponent implements OnInit { this.showDetails.emit(this.structure); } - public cardHover(hoverOut: boolean): void { + public cardHover(): void { this.hover.emit(this.structure); } }