Commit 915a9c87 authored by Michael Ochmann's avatar Michael Ochmann
Browse files

added track to map

parent 03a2dcbe
......@@ -15,7 +15,7 @@ class HeightMapViewController extends UIViewController {
constructor(view, model) {
super(view, model);
this.state = States.MAP;
this.state = Settings.get("mapState", States.HEIGHTMAP);
this.canvas = null;
this.drag = false;
this.lastX = 0;
......@@ -65,10 +65,12 @@ class HeightMapViewController extends UIViewController {
});
$("#hmButton").click(element => {
this.state = States.HEIGHTMAP;
Settings.set("mapState", this.state);
this.renderCall();
});
$("#mButton").click(element => {
this.state = States.MAP;
Settings.set("mapState", this.state);
this.renderCall();
});
if (!this.isCapturing && this.model.points.length === 0 || this.state === States.MAP)
......
......@@ -15,6 +15,7 @@ class MapController extends UIViewController {
id: 'mapbox.streets',
accessToken: 'pk.eyJ1IjoibWlrbzAwNyIsImEiOiJjampuMGRwN2wxdDNjM3ZuendsZzZod2FtIn0.0kPe41l0WPOHuV0Cr82ZKw'
}).addTo(map);
let track = L.polyline(this.model.points.map(point => [point.latitude, point.longitude])).addTo(map);
}
}
......
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