Commit a4b5ea54 authored by Michael Ochmann's avatar Michael Ochmann
Browse files

fixed bug in `navigator.location.watchPosition` call

parent 63695f8f
...@@ -34,19 +34,19 @@ class HeightMapViewController extends UIViewController { ...@@ -34,19 +34,19 @@ class HeightMapViewController extends UIViewController {
this.addSubview(new MapController("#osm", this.model)); this.addSubview(new MapController("#osm", this.model));
navigator.geolocation.watchPosition(position => { navigator.geolocation.watchPosition(position => {
this.currentAcc = position.coords.accuracy; this.currentAcc = position.coords.accuracy;
if (!this.isCapturing || position.coords.accuracy > 100) if (!this.isCapturing || position.coords.accuracy > 100)
return; return;
this.addPoint(new GeoPoint( this.addPoint(new GeoPoint(
position.coords.latitude, position.coords.latitude,
position.coords.longitude, position.coords.longitude,
position.coords.altitude position.coords.altitude
), error => console.log(error), { ));
}, error => console.log(error), {
timeout : 0, timeout : 0,
enableHighAccuracy : true, enableHighAccuracy : true,
maximumAge : Infinity maximumAge : Infinity
}); });
});
} }
/** /**
......
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