]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions.js
Use svg symbols for routing icons
[rails.git] / app / assets / javascripts / index / directions.js
index cddb3a45174769aca99e377507fc2d0151b7a355..89888bbd10cf7fd1aeb61f766123ada69bc0737d 100644 (file)
@@ -171,7 +171,11 @@ OSM.Directions = function (map) {
         const [ll, direction, instruction, dist, lineseg] = step;
 
         const row = $("<tr class='turn'/>");
-        row.append("<td class='border-0'><div class='direction i" + direction + "'/></td> ");
+        if (direction) {
+          row.append("<td class='border-0'><svg width='20' height='20' class='d-block'><use href='#routing-sprite-" + direction + "' /></svg></td>");
+        } else {
+          row.append("<td class='border-0'>");
+        }
         row.append("<td>" + instruction);
         row.append("<td class='distance text-body-secondary text-end'>" + getDistText(dist));