Skip to content

Commit

Permalink
change point number on markers if the points_order array requests a c…
Browse files Browse the repository at this point in the history
…hange
  • Loading branch information
karussell committed Jan 19, 2017
1 parent b4c48d8 commit 0e85733
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions web/src/main/webapp/js/main-template.js
Expand Up @@ -555,6 +555,14 @@ function routeLatLng(request, doQuery) {
};
};

if(json.paths.length > 0 && json.paths[0].points_order) {
mapLayer.clearLayers();
var po = json.paths[0].points_order;
for (var i = 0; i < po.length; i++) {
setFlag(ghRequest.route.getIndex(po[i]), i);
}
}

for (var pathIndex = 0; pathIndex < json.paths.length; pathIndex++) {
var tabHeader = $("<li>").append((pathIndex + 1) + "<img class='alt_route_img' src='img/alt_route.png'/>");
if (pathIndex === 0)
Expand Down

0 comments on commit 0e85733

Please sign in to comment.