aboutsummaryrefslogtreecommitdiff
path: root/web/load.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-05-24 23:43:22 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-05-24 23:43:41 +1200
commit0e598a6232e9cd7188916e06077862d6630a255b (patch)
tree14d7a97478270b85a364d2e31d20a717c5f070e6 /web/load.js
parent4152d5749c9a2030edc4c7548a04ffa0ef851cd9 (diff)
downloadetbsa-traccar-web-0e598a6232e9cd7188916e06077862d6630a255b.tar.gz
etbsa-traccar-web-0e598a6232e9cd7188916e06077862d6630a255b.tar.bz2
etbsa-traccar-web-0e598a6232e9cd7188916e06077862d6630a255b.zip
Add new categories (fix #495)
Diffstat (limited to 'web/load.js')
-rw-r--r--web/load.js16
1 files changed, 5 insertions, 11 deletions
diff --git a/web/load.js b/web/load.js
index 88eb1cf..f6da4e6 100644
--- a/web/load.js
+++ b/web/load.js
@@ -154,16 +154,10 @@
addScriptFile('//cdnjs.cloudflare.com/ajax/libs/proj4js/' + proj4jsVersion + '/proj4.js');
}
- addSvgFile('images/default.svg', 'defaultSvg');
- addSvgFile('images/arrow.svg', 'arrowSvg');
- addSvgFile('images/car.svg', 'carSvg');
- addSvgFile('images/bus.svg', 'busSvg');
- addSvgFile('images/truck.svg', 'truckSvg');
- addSvgFile('images/ship.svg', 'shipSvg');
- addSvgFile('images/plane.svg', 'planeSvg');
- addSvgFile('images/motorcycle.svg', 'motorcycleSvg');
- addSvgFile('images/bicycle.svg', 'bicycleSvg');
- addSvgFile('images/person.svg', 'personSvg');
- addSvgFile('images/animal.svg', 'animalSvg');
+ window.Images = ['arrow', 'default', 'animal', 'bicycle', 'boat', 'bus', 'car', 'crane', 'helicopter',
+ 'motorcycle', 'offroad', 'person', 'pickup', 'plane', 'ship', 'tractor', 'truck', 'van'];
+ for (i = 0; i < window.Images.length; i++) {
+ addSvgFile('images/' + window.Images[i] + '.svg', window.Images[i] + 'Svg');
+ }
})();