mirror of
				https://github.com/DerTyp7/street-map-typescript.git
				synced 2025-10-30 21:27:09 +01:00 
			
		
		
		
	added search component
This commit is contained in:
		| @@ -1,6 +1,4 @@ | ||||
| import { Component, OnInit, AfterViewInit, ElementRef, ViewChild} from '@angular/core'; | ||||
| import { Nominatim } from './interfaces/nominatim'; | ||||
| import { NominatimService } from './nominatim.service'; | ||||
| import { Component, OnInit, AfterViewInit} from '@angular/core'; | ||||
|  | ||||
| import { defaults as defaultControls } from 'ol/control'; | ||||
| import { fromLonLat } from 'ol/proj'; | ||||
| @@ -20,24 +18,6 @@ export class AppComponent implements AfterViewInit, OnInit { | ||||
|   title = "Street Map"; | ||||
|   map: Map; | ||||
|  | ||||
|   @ViewChild("inputautocompleteList") autocompleteList: ElementRef; | ||||
|  | ||||
|  | ||||
|   constructor(private nominatimService: NominatimService) { } | ||||
|    | ||||
|   updateAutoCompleteList(): void{ | ||||
|     this.autocompleteList.nativeElement.innerHTML = "Fsd"; | ||||
|   } | ||||
|  | ||||
|   // Gets called in "app.component.html" when an input changes its value | ||||
|   getValue(valueFrom:string, valueTo:string): void{ | ||||
|     console.log("From " + valueFrom + " to " + valueTo); | ||||
|  | ||||
|     this.nominatimService.sendQueryRequest(valueFrom) | ||||
|     .subscribe((response: Nominatim[]) => console.log(response)); | ||||
|      | ||||
|   } | ||||
|  | ||||
|   ngOnInit() { | ||||
|      | ||||
|   } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Janis Meister
					Janis Meister