Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Michael Ochmann
trakr.
Commits
a4b5ea54
Commit
a4b5ea54
authored
Jul 16, 2018
by
Michael Ochmann
Browse files
fixed bug in `navigator.location.watchPosition` call
parent
63695f8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/javascript/controllers/HeightMapViewController.js
View file @
a4b5ea54
...
...
@@ -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
});
});
}
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment