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