X-Git-Url: https://git-public.kairo.at/?p=lantea.git;a=blobdiff_plain;f=js%2Fui.js;h=0171e274e35508352a68a64d2ab5c9d3bebc52be;hp=74ea52115a812755d228aa88cd1f70a5ca5854ba;hb=55c4a0b7df4ca84d3d2fb6c6e294b0b75751b6ed;hpb=23cd2dcceff47d3ff6156c6c4fba913f2ee2f9b9 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"; + } +}