X-Git-Url: https://git-public.kairo.at//?a=blobdiff_plain;f=js%2Fui.js;h=0171e274e35508352a68a64d2ab5c9d3bebc52be;hb=05c217570b27ee69eaa73af8b88383955c56bde8;hp=74ea52115a812755d228aa88cd1f70a5ca5854ba;hpb=23cd2dcceff47d3ff6156c6c4fba913f2ee2f9b9;p=lantea.git diff --git a/js/ui.js b/js/ui.js index 74ea521..0171e27 100644 --- a/js/ui.js +++ b/js/ui.js @@ -35,4 +35,30 @@ * * ***** END LICENSE BLOCK ***** */ +window.onload = function() { + var mSel = document.getElementById("mapSelector"); + for (var mapStyle in gMapStyles) { + var opt = document.createElement("option"); + opt.value = mapStyle; + opt.text = gMapStyles[mapStyle].name; + mSel.add(opt, null); + } + initMap(); + resizeAndDraw(); + startTracking(); +} + +window.onresize = function() { + resizeAndDraw(); +} + +function toggleSettings() { + var fs = document.getElementById("settings"); + if (fs.style.display != "block") { + fs.style.display = "block"; + } + else { + fs.style.display = "none"; + } +}