mirror of
https://github.com/DerTyp7/street-map-typescript.git
synced 2025-10-30 05:07:12 +01:00
26 lines
689 B
TypeScript
26 lines
689 B
TypeScript
import { Component, ViewChild, } from '@angular/core';
|
|
import { Osrm } from './interfaces/osrm';
|
|
import { MapComponent } from './map/map.component';
|
|
import { RouteListComponent } from './route-list/route-list.component';
|
|
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
templateUrl: './app.component.html',
|
|
styleUrls: ['./app.component.css', '../../node_modules/ol/ol.css']
|
|
})
|
|
|
|
|
|
|
|
export class AppComponent {
|
|
title = "Street Map";
|
|
@ViewChild('mapRef') mapCompopnent!: MapComponent;
|
|
@ViewChild('routeListRef') routeListCompopnent!: RouteListComponent;
|
|
|
|
onSearchResponse($event: Osrm): void {
|
|
this.mapCompopnent.drawPath($event);
|
|
this.routeListCompopnent.updateSidebar($event);
|
|
}
|
|
}
|
|
|