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
fa13c3e3
Commit
fa13c3e3
authored
Jul 15, 2018
by
Michael Ochmann
Browse files
.
parent
3366afd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/javascript/controllers/HeightMapViewController.js
View file @
fa13c3e3
...
...
@@ -27,18 +27,18 @@ class HeightMapViewController extends UIViewController {
}
capture
()
{
/*
navigator.geolocation.getCurrentPosition(position => {
navigator
.
geolocation
.
getCurrentPosition
(
position
=>
{
this
.
addPoint
(
new
GeoPoint
(
position
.
coords
.
latitude
,
position
.
coords
.
longitude
,
position
.
coords
.
altitude
));
});
*/
this
.
addPoint
(
new
GeoPoint
(
});
/*
this.addPoint(new GeoPoint(
Std.Random(136, 150),
Std.Random(60, 150),
Std.Random(80, 159)
));
));
*/
}
/**
...
...
@@ -128,7 +128,8 @@ class HeightMapViewController extends UIViewController {
let
ordinateVal
=
Std
.
Map
(
point
.
altitude
,
min
,
this
.
model
.
max
,
0
,
height
*
0.95
);
ctx
.
lineTo
(
x
,
height
-
ordinateVal
);
x
+=
40
;
ctx
.
fillText
(
point
.
altitude
,
x
-
50
,
height
-
ordinateVal
-
16
);
if
(
point
.
altitude
)
ctx
.
fillText
(
point
.
altitude
.
toFixed
(
2
),
x
-
50
,
height
-
ordinateVal
-
16
);
}
ctx
.
lineTo
(
x
-
40
,
height
);
ctx
.
lineTo
(
0
,
height
);
...
...
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