Commit 84376389 authored by Eric - kg6wxc's avatar Eric - kg6wxc
Browse files

hopefully fixed spiderfy and the screwed up link lines

parent 89d1e802
...@@ -1157,10 +1157,9 @@ function create_MapImage() ...@@ -1157,10 +1157,9 @@ function create_MapImage()
//SPIDERFY //SPIDERFY
var oms = new Spiderfy(map); var oms = new Spiderfy(map);
oms.disable();
map.on('zoomend', function(e) { map.on('zoomend', function(e) {
currZoom = e.target._zoom; currZoom = e.target._zoom;
if(currZoom >= 12) { if(currZoom >= 0) {
oms.enable(); oms.enable();
document.getElementById('spiderfyActive').style.visibility = 'visible'; document.getElementById('spiderfyActive').style.visibility = 'visible';
oms.addListener('activate', function(markers) { oms.addListener('activate', function(markers) {
...@@ -1168,7 +1167,8 @@ function create_MapImage() ...@@ -1168,7 +1167,8 @@ function create_MapImage()
markers[i].closePopup(); markers[i].closePopup();
} }
}); });
}else { }
if(currZoom >= 12) {
oms.disable(); oms.disable();
document.getElementById('spiderfyActive').style.visibility = 'hidden'; document.getElementById('spiderfyActive').style.visibility = 'hidden';
oms.removeListener('activate', function(markers) { oms.removeListener('activate', function(markers) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment