Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.1",
"scripts": {
"ng": "ng",
"start": "ng serve",
"start": "npx ng serve --proxy-config proxy.conf.json",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
Expand Down Expand Up @@ -62,4 +62,4 @@
"tslint": "~6.1.0",
"typescript": "~4.1.6"
}
}
}
10 changes: 10 additions & 0 deletions proxy.conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"/api": {
"target": "https://api.testing.opensensemap.org",
"secure": true,
"changeOrigin": true,
"pathRewrite": {
"^/api": ""
}
}
}
5 changes: 5 additions & 0 deletions src/app/@types/Location.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export interface Location {
timestamp: string;
coordinats: number[];
type: string;
}
71 changes: 71 additions & 0 deletions src/app/@types/LocationIq.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/**
* Location IQ Search Request Interface
*
* @export
* @interface LocationIqSearchRequest
*/
export interface LocationIqSearchRequest {
q?: string;
street?: string;
city?: string;
county?: string;
state?: string;
country?: string;
postalcode?: string;
viewbox?: string;
bounded?: string;
addressdetails?: boolean;
limit?: string;
acceptLanguage?: string;
countrycodes?: string;
namedetails?: string;
dedupe?: string;
polygon_geojson?: string;
polygon_kml?: string;
polygon_svg?: string;
polygon_text?: string;
extratags?: string;
excludePlaceIds?: string;
normalizecity?: string;
}

/**
* * Location IQ Search Result Interface
*
* @export
* @interface LocationIqSearchResult
*/
export interface LocationIqSearchResult {
place_id?: string;
licence?: string;
osm_type?: string;
osm_id?: string;
boundingbox?: any[];
lat?: number;
lon?: number;
display_name?: string;
class?: string;
type?: string;
importance?: string;
icon?: string;
address?: string;
extratags?: string;
namedetails?: string;
geojson?: string;
geokml?: string;
svg?: string;
geotext?: string;
}

/**
* * Location IQ Search Response Interface
*
* @export
* @interface LocationIqSearchResponse
*/
export interface LocationIqSearchResponse {
status: number;
total?: number;
error?: string;
results?: LocationIqSearchResponse[]
}
7 changes: 7 additions & 0 deletions src/app/@types/SearchResult.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Location } from "./Location";

export interface SearchResult {
_id: string;
name: string;
currentLocation: Location;
}
Loading