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

Fix JS error on homepage (this._flash.addOverlay is not a function)

parent 65f87705
Branches
No related tags found
No related merge requests found
...@@ -120,6 +120,9 @@ function letsdothisloop(delay) { ...@@ -120,6 +120,9 @@ function letsdothisloop(delay) {
}; };
function openLocation(lng, lat, username, location, displayname, title, comment, linkname) { function openLocation(lng, lat, username, location, displayname, title, comment, linkname) {
if (!map1._flash.addOverlay) {
return;
}
if(!pinsonly) if(!pinsonly)
clearTimeout(t); clearTimeout(t);
var latlng = new FE.LatLng(lat,lng); var latlng = new FE.LatLng(lat,lng);
...@@ -131,7 +134,7 @@ function openLocation(lng, lat, username, location, displayname, title, comment, ...@@ -131,7 +134,7 @@ function openLocation(lng, lat, username, location, displayname, title, comment,
//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);});
map1.addOverlay(label); map1.addOverlay(label);
if(!pinsonly) if(!pinsonly)
applylabel(latlng, location, title, comment, displayname, username, linkname); applylabel(latlng, location, title, comment, displayname, username, linkname);
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment