mirror of
https://github.com/DerTyp7/local-analyzer-angular.git
synced 2025-10-28 20:32:14 +01:00
add help texts
This commit is contained in:
@@ -36,24 +36,24 @@ 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 => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
this.status = "<label style='color:rgb(209, 39, 39); font-weight:bold;'>Dowloading OSM data failed!</label>\
|
this.status = "<label style='color:rgb(209, 39, 39); font-weight:bold;'>Dowloading OSM data failed!</label>\
|
||||||
<br>You may have been set on pause by the server, because of too many requests in a short amount of time.";
|
<br>You may have been set on pause by the server, because of too many requests in a short amount of time.";
|
||||||
return of("");
|
return of("");
|
||||||
}))
|
}))
|
||||||
.subscribe((data: string) => {
|
.subscribe((data: string) => {
|
||||||
if(data != ""){
|
if (data != "") {
|
||||||
let osm: OSM = this.osmService.parseOsmContent(data);
|
let osm: OSM = this.osmService.parseOsmContent(data);
|
||||||
// Analyze the OSM data
|
// Analyze the OSM data
|
||||||
this.status = "Analyze OSM data...";
|
this.status = "Analyze OSM data...";
|
||||||
this.osmAnalysis = this.osmAnalysisService.getOsmAnalysis(osm);
|
this.osmAnalysis = this.osmAnalysisService.getOsmAnalysis(osm);
|
||||||
this.status = "";
|
this.status = "";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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(
|
||||||
<span >
|
result.geometry!.coordinates[0],
|
||||||
<b>{{result.properties.name}}</b> {{result.properties.postcode}} {{result.properties.city}} {{result.properties.country}}
|
result.geometry!.coordinates[1]
|
||||||
|
)
|
||||||
|
"
|
||||||
|
*ngIf="
|
||||||
|
result.geometry!.coordinates &&
|
||||||
|
(result.geometry?.coordinates)!.length >= 2
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
<b>{{ result.properties.name }}</b> {{ result.properties.postcode }}
|
||||||
|
{{ result.properties.city }} {{ result.properties.country }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
.search-bar{
|
.search-bar {
|
||||||
margin-top: 50px;
|
margin-top: 50px;
|
||||||
width: 600px;
|
width: 600px;
|
||||||
transition: 0.1s;
|
transition: 0.1s;
|
||||||
transition-timing-function: linear;
|
transition-timing-function: linear;
|
||||||
|
|
||||||
&:hover{
|
&:hover,
|
||||||
|
&:focus-within {
|
||||||
width: 700px;
|
width: 700px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input{
|
input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: 2px solid rgb(84, 206, 104);
|
border: 2px solid rgb(84, 206, 104);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
background-color: rgba(0,0,0,0);
|
background-color: rgba(0, 0, 0, 0);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
@@ -21,42 +22,43 @@
|
|||||||
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%;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-results{
|
.search-results {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: rgba(255,255,255,0.02);
|
background-color: rgba(255, 255, 255, 0.02);
|
||||||
border-top: 0px !important;
|
border-top: 0px !important;
|
||||||
border: 2px solid rgb(59, 59, 59);
|
border: 2px solid rgb(59, 59, 59);
|
||||||
margin-top: -2px;
|
margin-top: -2px;
|
||||||
transition: 0.1s;
|
transition: 0.1s;
|
||||||
transition-timing-function: linear;
|
transition-timing-function: linear;
|
||||||
|
|
||||||
&:hover{
|
&:hover {
|
||||||
border-color: rgb(85, 85, 85);
|
border-color: rgb(85, 85, 85);
|
||||||
background-color: rgba(218, 216, 216, 0.03);
|
background-color: rgba(218, 216, 216, 0.03);
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-result{
|
.search-result {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
border-bottom: 1px solid rgba(255, 255, 255, 0.062);
|
border-bottom: 1px solid rgba(255, 255, 255, 0.062);
|
||||||
font-size: 12pt;
|
font-size: 12pt;
|
||||||
cursor:pointer;
|
cursor: pointer;
|
||||||
transition: 0.1s;
|
transition: 0.1s;
|
||||||
transition-timing-function: linear;
|
transition-timing-function: linear;
|
||||||
letter-spacing: 1.5px;
|
letter-spacing: 1.5px;
|
||||||
|
|
||||||
&:hover{
|
&:hover {
|
||||||
border-left: 5px solid rgb(84, 206, 104);
|
border-left: 5px solid rgb(84, 206, 104);
|
||||||
padding-left: 25px;
|
padding-left: 25px;
|
||||||
background-color: rgba(218, 216, 216, 0.05);
|
background-color: rgba(218, 216, 216, 0.05);
|
||||||
|
|||||||
Reference in New Issue
Block a user