dynamically add and remove legend with checkbox-toggle
This commit is contained in:
parent
210061442f
commit
8ef1b34c3b
@ -155,9 +155,13 @@ export class MapService {
|
||||
marker.on('mouseout', e => e.target.closePopup());
|
||||
this.drawLineOnMiniMap(marker, point);
|
||||
this.markerLayer.push(marker);
|
||||
this.miniMap.fitBounds(L.featureGroup([...this.markerLayer, this.dashBoardMarker]).getBounds());
|
||||
this.miniMap.fitBounds(L.featureGroup([this.dashBoardMarker, ...this.markerLayer]).getBounds());
|
||||
}
|
||||
if (this.polylineLayer.length === 0) {
|
||||
this.legend.remove();
|
||||
} else {
|
||||
this.drawLegend();
|
||||
}
|
||||
this.drawLegend();
|
||||
}
|
||||
|
||||
drawLegend(): void {
|
||||
|
Loading…
Reference in New Issue
Block a user