mirror of
				https://github.com/DerTyp7/osm-routing-angular.git
				synced 2025-10-31 05:17:07 +01:00 
			
		
		
		
	removed route-list
This commit is contained in:
		| @@ -4,4 +4,3 @@ | |||||||
| </header> | </header> | ||||||
|  |  | ||||||
| <app-map #mapRef></app-map> | <app-map #mapRef></app-map> | ||||||
| <app-route-list #routeListRef></app-route-list> |  | ||||||
|   | |||||||
| @@ -1,6 +1,5 @@ | |||||||
| import { Component, ViewChild, } from '@angular/core'; | import { Component, ViewChild, } from '@angular/core'; | ||||||
| import { MapComponent } from './map/map.component'; | import { MapComponent } from './map/map.component'; | ||||||
| import { RouteListComponent } from './route-list/route-list.component'; |  | ||||||
| import { RouteResponse } from './interfaces/routeResponse'; | import { RouteResponse } from './interfaces/routeResponse'; | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -14,11 +13,9 @@ export class AppComponent { | |||||||
|   title = "Street Map"; |   title = "Street Map"; | ||||||
|  |  | ||||||
|   @ViewChild('mapRef') mapCompopnent!: MapComponent; |   @ViewChild('mapRef') mapCompopnent!: MapComponent; | ||||||
|   @ViewChild('routeListRef') routeListCompopnent!: RouteListComponent; |  | ||||||
|  |  | ||||||
|   onSearchResponse($event: RouteResponse): void { |   onSearchResponse($event: RouteResponse): void { | ||||||
| 		this.mapCompopnent.drawPath($event); | 		this.mapCompopnent.drawPath($event); | ||||||
|     //this.routeListCompopnent.updateSidebar($event); |  | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -4,14 +4,12 @@ import { HttpClientModule } from '@angular/common/http'; | |||||||
| import { AppComponent } from './app.component'; | import { AppComponent } from './app.component'; | ||||||
| import { SearchComponent } from './search/search.component'; | import { SearchComponent } from './search/search.component'; | ||||||
| import { MapComponent } from './map/map.component'; | import { MapComponent } from './map/map.component'; | ||||||
| import { RouteListComponent } from './route-list/route-list.component'; |  | ||||||
|  |  | ||||||
| @NgModule({ | @NgModule({ | ||||||
|   declarations: [ |   declarations: [ | ||||||
|     AppComponent, |     AppComponent, | ||||||
|     SearchComponent, |     SearchComponent, | ||||||
|     MapComponent, |     MapComponent, | ||||||
|     RouteListComponent, |  | ||||||
|   ], |   ], | ||||||
|   imports: [ |   imports: [ | ||||||
|     BrowserModule, |     BrowserModule, | ||||||
|   | |||||||
| @@ -1,49 +0,0 @@ | |||||||
| .osrm-route-container { |  | ||||||
|   position: absolute; |  | ||||||
|   right: 0; |  | ||||||
|   width:300px; |  | ||||||
|   margin-top: 50px; |  | ||||||
|   background-color: rgba(27, 27, 27, 0.801); |  | ||||||
|   top:0; |  | ||||||
|   bottom: 0; |  | ||||||
|   color: white; |  | ||||||
|   overflow-y: scroll; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .osrm-route-container h4 { |  | ||||||
|   text-align: center; |  | ||||||
|   line-height: 30px; |  | ||||||
|   letter-spacing: 1px; |  | ||||||
|   padding-top: 0px; |  | ||||||
|   margin-top: 2px; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .route-list { |  | ||||||
|   width: 100%; |  | ||||||
|   display: block; |  | ||||||
|   font-weight: bold; |  | ||||||
|   text-align: left; |  | ||||||
|  |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .route-list .route-list-item { |  | ||||||
|   width: 100%; |  | ||||||
|   display: block; |  | ||||||
|   border-top: 1px solid rgba(255, 255, 255, 0.418); |  | ||||||
|   padding-top: 5px; |  | ||||||
|   padding-bottom: 5px; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .route-list .route-list-item div { |  | ||||||
|   width: 100%; |  | ||||||
|   /*background-image: url('/assets/images/turn-left.svg');*/ |  | ||||||
|   background-repeat: no-repeat; |  | ||||||
|   background-size: 35px 35px; |  | ||||||
|   background-position:5px 10px; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .route-list .route-list-item div p { |  | ||||||
|   display: inline-block; |  | ||||||
|   text-transform: capitalize; |  | ||||||
|   padding-left: 50px; |  | ||||||
| } |  | ||||||
| @@ -1,19 +0,0 @@ | |||||||
| <div class="osrm-route-container"> |  | ||||||
|   <h4>Your Route Steps</h4> |  | ||||||
|  |  | ||||||
|   <div class="route-list"> |  | ||||||
|     <!-- |  | ||||||
|     <div *ngFor="let step of this.routeSteps" class="route-list-item" > |  | ||||||
|       Fork |  | ||||||
|       <div *ngIf="step.maneuver?.type != 'fork'" style="background-image: url('/assets/images/{{step.maneuver?.modifier }}.svg');"> |  | ||||||
|         <p>{{step.maneuver?.type}} {{step.maneuver?.modifier}} <br> {{step.name}}</p> |  | ||||||
|       </div> |  | ||||||
|  |  | ||||||
|       Not Fork |  | ||||||
|       <div *ngIf="step.maneuver?.type == 'fork'" style="background-image: url('/assets/images/{{step.maneuver?.type }}-{{step.maneuver?.modifier }}.svg');"> |  | ||||||
|         <p>{{step.maneuver?.type}} {{step.maneuver?.modifier}} <br> {{step.name}}</p> |  | ||||||
|       </div> |  | ||||||
|     </div>--> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
|  |  | ||||||
| @@ -1,25 +0,0 @@ | |||||||
| import { ComponentFixture, TestBed } from '@angular/core/testing'; |  | ||||||
|  |  | ||||||
| import { RouteListComponent } from './route-list.component'; |  | ||||||
|  |  | ||||||
| describe('RouteListComponent', () => { |  | ||||||
|   let component: RouteListComponent; |  | ||||||
|   let fixture: ComponentFixture<RouteListComponent>; |  | ||||||
|  |  | ||||||
|   beforeEach(async () => { |  | ||||||
|     await TestBed.configureTestingModule({ |  | ||||||
|       declarations: [ RouteListComponent ] |  | ||||||
|     }) |  | ||||||
|     .compileComponents(); |  | ||||||
|   }); |  | ||||||
|  |  | ||||||
|   beforeEach(() => { |  | ||||||
|     fixture = TestBed.createComponent(RouteListComponent); |  | ||||||
|     component = fixture.componentInstance; |  | ||||||
|     fixture.detectChanges(); |  | ||||||
|   }); |  | ||||||
|  |  | ||||||
|   it('should create', () => { |  | ||||||
|     expect(component).toBeTruthy(); |  | ||||||
|   }); |  | ||||||
| }); |  | ||||||
| @@ -1,20 +0,0 @@ | |||||||
| import { Component } from '@angular/core'; |  | ||||||
|  |  | ||||||
| @Component({ |  | ||||||
|   selector: 'app-route-list', |  | ||||||
|   templateUrl: './route-list.component.html', |  | ||||||
|   styleUrls: ['./route-list.component.css'] |  | ||||||
| }) |  | ||||||
| export class RouteListComponent { |  | ||||||
|   routeSteps = [] |  | ||||||
|   /* |  | ||||||
|   routeSteps: Array<OsrmStep> = []; |  | ||||||
|  |  | ||||||
|   updateSidebar(osrm: Osrm): void{ |  | ||||||
|     console.log("updateSidebar"); |  | ||||||
|     if (osrm.routes[0].legs[0].steps) { |  | ||||||
|       this.routeSteps = osrm.routes[0].legs[0].steps; |  | ||||||
|     } |  | ||||||
|   }*/ |  | ||||||
|  |  | ||||||
| } |  | ||||||
		Reference in New Issue
	
	Block a user
	 Janis Meister
					Janis Meister