Commit 6d40ac67 authored by Ratnadeep Rajendra Kharade's avatar Ratnadeep Rajendra Kharade
Browse files

Set default coordinates to Stuttgart Hauptbahnhof if user location is not available.

parent 67e868bb
...@@ -20,12 +20,11 @@ export class HomePage implements OnInit { ...@@ -20,12 +20,11 @@ export class HomePage implements OnInit {
private map: any; private map: any;
private defaultLayers: any; private defaultLayers: any;
private locationsGroup: any; private locationsGroup: any;
private currentUserPosition = {lat: 0, lng: 0}; private currentUserPosition = {lat: 48.783480, lng: 9.180319};
bikes = []; bikes = [];
bikeApi: Observable<any>; bikeApi: Observable<any>;
private currentLocation = { lat: 0, lng: 0 };
public isDetailsVisible = false; public isDetailsVisible = false;
public selectedBike = { id: 0 }; public selectedBike = { id: 0 };
public isBikeReserved = false; public isBikeReserved = false;
...@@ -206,8 +205,8 @@ export class HomePage implements OnInit { ...@@ -206,8 +205,8 @@ export class HomePage implements OnInit {
).then((resp) => { ).then((resp) => {
let lat = resp.coords.latitude; let lat = resp.coords.latitude;
let lng = resp.coords.longitude; let lng = resp.coords.longitude;
this.currentLocation.lat = resp.coords.latitude; this.currentUserPosition.lat = resp.coords.latitude;
this.currentLocation.lng = resp.coords.longitude; this.currentUserPosition.lng = resp.coords.longitude;
this.showUserLocationOnMap(lat, lng); this.showUserLocationOnMap(lat, lng);
}, er => { }, er => {
//alert('Can not retrieve Location') //alert('Can not retrieve Location')
......
Markdown is supported
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