Skip to content
Snippets Groups Projects
Commit a34fee8f authored by Matthew Juhl's avatar Matthew Juhl
Browse files

Fix IE error

parent 3b4b03ce
No related branches found
No related tags found
No related merge requests found
...@@ -57,11 +57,12 @@ ...@@ -57,11 +57,12 @@
function startMap() { function startMap() {
this.toggleDashboard(); this.toggleDashboard();
self = this; //self = this;
letsdothisloop('0'); letsdothisloop('0');
pinsonly=false; pinsonly=false;
letsdothisloop('5000'); letsdothisloop('5000');
}; };
function letsdothisloop(delay) { function letsdothisloop(delay) {
if(c==0) displayNancyAndreasen(); if(c==0) displayNancyAndreasen();
else if(c==1) displayAtorodAzizinamini(); else if(c==1) displayAtorodAzizinamini();
...@@ -120,14 +121,14 @@ function openLocation(lng, lat, username, location, displayname, title, comment, ...@@ -120,14 +121,14 @@ function openLocation(lng, lat, username, location, displayname, title, comment,
clearTimeout(t); clearTimeout(t);
var latlng = new FE.LatLng(lat,lng); var latlng = new FE.LatLng(lat,lng);
if(!pinsonly){ if(!pinsonly){
setTimeout(function(){self.panTo(latlng,1.5,"easeInOutQuad")}, 50); setTimeout(function(){/*self*/map1.panTo(latlng,1.5,"easeInOutQuad")}, 50);
self.zoomTo(19505000,1.5,"easeInOutQuad"); map1./*self.*/zoomTo(19505000,1.5,"easeInOutQuad");
} }
label = window.label = new FE.Pushpin(latlng,new FE.Icon('<?php echo $CONFIG->url ?>/mod/customindex/map-pin-12.png')); label = window.label = new FE.Pushpin(latlng,new FE.Icon('<?php echo $CONFIG->url ?>/mod/customindex/map-pin-12.png'));
//make pins clickable //make pins clickable
if(pinsonly) if(pinsonly)
FE.Event.addListener(label, 'click', function() { openLocation(lng, lat, username, location, displayname, title, comment, linkname);}); FE.Event.addListener(label, 'click', function() { openLocation(lng, lat, username, location, displayname, title, comment, linkname);});
self.addOverlay(label); /*self*/map1.addOverlay(label);
if(!pinsonly) if(!pinsonly)
applylabel(latlng, location, title, comment, displayname, username, linkname); applylabel(latlng, location, title, comment, displayname, username, linkname);
}; };
...@@ -141,9 +142,9 @@ function applylabel(latlng, location, title, comment, displayname, username, lin ...@@ -141,9 +142,9 @@ function applylabel(latlng, location, title, comment, displayname, username, lin
WDN.jQuery(document).ready(function() { WDN.jQuery(document).ready(function() {
try{ try{
var map = new FE.Map(document.getElementById("globeInner")); window.map1 = new FE.Map(document.getElementById("globeInner"));
map.onLoad = startMap; map1.onLoad = startMap;
map.load(); map1.load();
}catch(e){} }catch(e){}
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment