When I use the Geolocation.watchPosition function, it gives me the location fine but as i start travelling, say walk down the street, the location stays the same. I even tryed doing Geolocation.getCurrentPosition inside of a setInterval function but that doesnt work at all. What could I do to accomplish a constant location tracking system?
My code looks like this so far.
setInterval(function(){
Geolocation.getCurrentPosition(options).then(pos => {
let lat = pos.coords.latitude;
let long = pos.coords.longitude;
this.loC = pos;
this.http.get('https://maps.googleapis.com/maps/api/geocode/json?latlng='+lat+','+long+'', null)
.map((res) => res.json())
.subscribe(data => {
console.log(data);
this.address = data.results[0].formatted_address;
});
}, (PositionError) => {this.loCError = PositionError.message});
}, 1000);