mirror of
https://github.com/DerTyp7/street-map-typescript.git
synced 2025-10-29 12:52:11 +01:00
added selectedPhoton obejct
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#inputFrom:focus + .autocomplete-items-from{
|
||||
display:block;
|
||||
visibility:visible;
|
||||
}
|
||||
|
||||
#inputTo:focus + .autocomplete-items-to{
|
||||
display:block;
|
||||
visibility:visible;
|
||||
}
|
||||
|
||||
.searchField{
|
||||
@@ -31,7 +31,7 @@
|
||||
}
|
||||
|
||||
.autocomplete-items {
|
||||
display:block; /* without debugging it should be display:none */
|
||||
visibility: visible; /* without debugging it should be display:none */
|
||||
position: absolute;
|
||||
border: 1px solid #d4d4d4;
|
||||
border-bottom: none;
|
||||
|
||||
@@ -27,10 +27,14 @@ export class SearchComponent implements OnInit {
|
||||
longTo: number = 0;
|
||||
latTo: number = 0;
|
||||
|
||||
selectedPhotonFrom: Photon;
|
||||
selectedPhotonTo: Photon;
|
||||
|
||||
constructor(private nominatimService: NominatimService, private photonService: PhotonService) { }
|
||||
|
||||
selectPhoton(isFrom: boolean, p: Photon): void{
|
||||
if(isFrom){
|
||||
this.selectedPhotonFrom = p;
|
||||
this.longFrom = <number> p.geometry?.coordinates[0];
|
||||
this.latFrom = <number> p.geometry?.coordinates[1];
|
||||
this.inputFromValue = <string> p.properties.name
|
||||
@@ -48,6 +52,7 @@ export class SearchComponent implements OnInit {
|
||||
}
|
||||
|
||||
}else{
|
||||
this.selectedPhotonTo = p;
|
||||
this.longTo = <number>p.geometry?.coordinates[0];
|
||||
this.latTo = <number>p.geometry?.coordinates[1];
|
||||
this.inputToValue = <string> p.properties.name + " " + p.properties.countrycode;
|
||||
|
||||
Reference in New Issue
Block a user