mirror of
https://github.com/DerTyp7/street-map-typescript.git
synced 2025-10-30 13:17:10 +01:00
add event in osrm response
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user