Commit 35b4c715 authored by Kevin Linne's avatar Kevin Linne

Let drawPois|Tags remove old ones

parent 83df6926
Pipeline #18430 failed with stages
in 5 minutes and 4 seconds
......@@ -73,7 +73,6 @@ export class MapViewComponent implements AfterViewInit {
modalRef.componentInstance.building = this.mapRendererService.selectedBuilding;
modalRef.componentInstance.level = this.mapRendererService.selectedLevel;
modalRef.result.then(() => {}).catch(() => {}).then(() => {
this.mapRendererService.removePois();
this.mapRendererService.drawPois();
});
}
......@@ -85,7 +84,6 @@ export class MapViewComponent implements AfterViewInit {
modalRef.componentInstance.lat = this.mapRendererService.getContextLat();
modalRef.componentInstance.level = this.mapRendererService.selectedLevel.level;
modalRef.result.then(() => {}).catch(() => {}).then(() => {
this.mapRendererService.removeTags();
this.mapRendererService.drawTags();
});
}
......
......@@ -105,6 +105,7 @@ export class MapRendererService {
}
async drawPois(): Promise<void> {
this.removePois();
this.poisShown = true;
try {
......@@ -123,6 +124,7 @@ export class MapRendererService {
}
async drawTags(): Promise<void> {
this.removeTags()
this.tagsShown = true;
try {
......@@ -185,9 +187,7 @@ export class MapRendererService {
});
this.applyPolygons();
this.removePois();
this.drawPois();
this.removeTags();
this.drawTags();
}
......@@ -195,8 +195,6 @@ export class MapRendererService {
if (this.isBuildingClicked()) {
this.drawBuildings();
}
this.removePois();
this.removeTags();
this.drawPois();
this.drawTags();
}
......@@ -255,7 +253,6 @@ export class MapRendererService {
const modalRef = this.modalService.open(AddEditPoiComponent, {size: 'lg'});
modalRef.componentInstance.id = id;
modalRef.result.then(() => {
this.removePois();
this.drawPois();
});
}
......@@ -264,7 +261,6 @@ export class MapRendererService {
const modalRef = this.modalService.open(AddEditTagComponent, {size: 'lg'});
modalRef.componentInstance.id = id;
modalRef.result.then(() => {
this.removeTags();
this.drawTags();
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment