Skip to content
Snippets Groups Projects
Commit 17dc6d44 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

feat: update map control position

parent 6118657f
No related branches found
No related tags found
2 merge requests!11Recette,!10Feat/structure detail
......@@ -69,3 +69,12 @@
display: flex;
}
}
::ng-deep .leaflet-left {
right: 0;
left: unset;
.leaflet-control {
margin-left: 0;
margin-right: 10px;
}
}
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
......
......@@ -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);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment