add event in osrm response

This commit is contained in:
Janis Meister
2022-01-26 12:41:36 +01:00
parent 8a98e9dbe6
commit b458c2c1b7
3 changed files with 18 additions and 6 deletions

View File

@@ -1,4 +1,6 @@
import { Component, } from '@angular/core';
import { Component, ViewChild, } from '@angular/core';
import { Osrm } from './interfaces/osrm';
import { MapComponent } from './map/map.component';
@Component({
@@ -7,8 +9,15 @@ import { Component, } from '@angular/core';
styleUrls: ['./app.component.css', '../../node_modules/ol/ol.css']
})
export class AppComponent {
title = "Street Map";
@ViewChild('mapRef') mapCompopnent!: MapComponent;
onSearchResponse($event: Osrm): void {
this.mapCompopnent.drawPath($event);
this.mapCompopnent.updateSidebar($event);
}
}