add help texts

This commit is contained in:
DerTyp7
2023-09-26 16:34:46 +02:00
parent 92a54b2960
commit d282cebf90
3 changed files with 61 additions and 39 deletions

View File

@@ -36,7 +36,7 @@ export class AnalyzeComponent implements OnInit {
let minLat: number = parseFloat(this.lat!) - 0.13; let minLat: number = parseFloat(this.lat!) - 0.13;
let maxLat: number = parseFloat(this.lat!) + 0.13; let maxLat: number = parseFloat(this.lat!) + 0.13;
this.status = "Downloading OSM data..."; this.status = "Downloading OSM data... This might take a few minutes ";
this.overpassApiService.sendQueryRequest(`${minLon},${minLat},${maxLon},${maxLat}`) this.overpassApiService.sendQueryRequest(`${minLon},${minLat},${maxLon},${maxLat}`)
.pipe(catchError(err => { .pipe(catchError(err => {

View File

@@ -1,18 +1,38 @@
<div class="search-bar center"> <div class="search-bar center">
<input class="center" type="text" name="searchValue" #searchInput (change)="inputChange(searchInput.value)" placeholder="Search your address" /> <input
class="center"
type="text"
name="searchValue"
#searchInput
(change)="inputChange(searchInput.value)"
placeholder="Search address (Enter to search)"
tabindex="1"
[ngClass]="{ active: searchInput.value }"
/>
<div
<div *ngIf="searchResults && searchResults.length > 0" class="search-results center"> *ngIf="searchResults && searchResults.length > 0"
<br> class="search-results center"
>
<br />
<div *ngFor="let result of searchResults"> <div *ngFor="let result of searchResults">
<div class="search-result" <div
(click)="analyze(result.geometry!.coordinates[0], result.geometry!.coordinates[1])" class="search-result"
*ngIf="result.geometry!.coordinates && result.geometry?.coordinates!.length >= 2"> (click)="
analyze(
result.geometry!.coordinates[0],
result.geometry!.coordinates[1]
)
"
*ngIf="
result.geometry!.coordinates &&
(result.geometry?.coordinates)!.length >= 2
"
>
<span> <span>
<b>{{result.properties.name}}</b> {{result.properties.postcode}} {{result.properties.city}} {{result.properties.country}} <b>{{ result.properties.name }}</b> {{ result.properties.postcode }}
{{ result.properties.city }} {{ result.properties.country }}
</span> </span>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -4,7 +4,8 @@
transition: 0.1s; transition: 0.1s;
transition-timing-function: linear; transition-timing-function: linear;
&:hover{ &:hover,
&:focus-within {
width: 700px; width: 700px;
} }
@@ -21,12 +22,13 @@
transition: 0.1s; transition: 0.1s;
transition-timing-function: linear; transition-timing-function: linear;
&:hover{ &:hover,
&:focus,
&.active {
border-color: rgb(128, 240, 147); border-color: rgb(128, 240, 147);
background-color: rgba(255, 255, 255, 0.05); background-color: rgba(255, 255, 255, 0.05);
width: 100%; width: 100%;
} }
} }
} }