aboutsummaryrefslogtreecommitdiff
path: root/web/load.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/load.js')
-rw-r--r--web/load.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/web/load.js b/web/load.js
index f4987acd..7f0caf9d 100644
--- a/web/load.js
+++ b/web/load.js
@@ -14,6 +14,15 @@
script.async = false
document.head.appendChild(script);
}
+
+ function addSvgFile(file, id) {
+ var svg = document.createElement('object');
+ svg.setAttribute('id', id);
+ svg.setAttribute('data', file);
+ svg.setAttribute('type', 'image/svg+xml');
+ svg.setAttribute('style','visibility:hidden')
+ document.body.appendChild(svg);
+ }
var debugMode = document.getElementById('loadScript').getAttribute('mode') === 'debug';
var touchMode = 'ontouchstart' in window || navigator.maxTouchPoints;
@@ -119,6 +128,11 @@
addScriptFile('//cdnjs.cloudflare.com/ajax/libs/ol3/' + olVersion + '/ol-debug.js');
addStyleFile('app.css');
- addScriptFile('arrow.js');
+ //addScriptFile('arrow.js');
+
+ addSvgFile('images/arrow.svg', 'arrowSvg');
+ addSvgFile('images/car.svg', 'carSvg');
+ addSvgFile('images/bus.svg', 'busSvg');
+ addSvgFile('images/truck.svg', 'truckSvg');
})();