Commit 602c5be0 authored by Jeremy M Fee's avatar Jeremy M Fee Committed by Edward J Hunter
Browse files

Add reference place to places service, nearby-places component

parent b1051482
<ng-container *ngIf="placesService.places$ | async as places">
<geoserve-nearby-place-list [places]="places"></geoserve-nearby-place-list>
\ No newline at end of file
export interface Place {
admin1_code: string;
admin1_name: string;
azimuth: number | string;
country_code: string;
country_name: string;
distance: number;
elevation: number;
feature_class: string;
feature_code: string;
admin1_code?: string;
admin1_name?: string;
azimuth?: number | string;
country_code?: string;
country_name?: string;
distance?: number;
elevation?: number;
feature_class?: string;
feature_code?: string;
latitude: number;
longitude: number;
name: string;
population: number;
name?: string;
population?: number;
......@@ -11,8 +11,11 @@ import { Feature } from './feature';
export class PlacesService {
places$ = new BehaviorSubject<Place[]>(null);
readonly PLACES_URL = environment.apiUrl + 'places.json';
referencePlace: Place;
constructor(private http: HttpClient) {}
buildUrl(latitude: number, longitude: number): string {
......@@ -59,6 +62,10 @@ export class PlacesService {
this.referencePlace = {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment