Skip to content
Snippets Groups Projects
Commit 2ec5b94a authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Nun werden Wegpunkte korrekt hinzugefügt

Normale Wegpunkte werden als neuer Wegpunkt hinzugefügt.
Der GPS Standort wird als Startpunkt ergänzt.
parent 6f1877cc
No related branches found
No related tags found
3 merge requests!10Master,!9Master,!8Resolve "Routing: Reihenfolge der Wegpunkte falsch herum?"
......@@ -163,7 +163,8 @@ RouteFinder.prototype.addWaypoint = function(lon, lat, nominatimParser, gpsManag
}else{
return false;
}
if(gpsManager !== undefined){
if(waypoint.type == "gps"){
console.log(waypoint);
this.waypoints.unshift(waypoint);
}else{
this.waypoints.push(waypoint);
......@@ -281,7 +282,7 @@ RouteFinder.prototype.addLegDescriptions = function(){
RouteFinder.prototype.addWaypointInterface = function(waypoint){
var waypointHtml = waypoint.getHtml();
if(waypoint.index === 0){
if(waypoint.type == "gps"){
$("#route-finder-addon #waypoint-list").prepend(waypointHtml);
}else{
$("#route-finder-addon #waypoint-list").append(waypointHtml);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment