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

Merge branch 'master' into 'master'

Quick Spiderify fix

See merge request !28
parents 8e7bfa58 50df420d
...@@ -1155,29 +1155,26 @@ function create_MapImage() ...@@ -1155,29 +1155,26 @@ function create_MapImage()
});\n\n });\n\n
} }
//SPIDERFY //SPIDERFY
var oms = new Spiderfy(map); currZoom = e.target._zoom;
if(currZoom >= 0) {
oms.disable(); oms.enable();
map.on('zoomend', function(e) { document.getElementById('spiderfyActive').style.visibility = 'visible';
currZoom = e.target._zoom; oms.addListener('activate', function(markers) {
if(currZoom >= 12) { for(var i = 0; i < markers.length; i++) {
oms.enable(); markers[i].closePopup();
document.getElementById('spiderfyActive').style.visibility = 'visible'; }
oms.addListener('activate', function(markers) { });
for(var i = 0; i < markers.length; i++) { }if(currZoom <= 11) {
markers[i].closePopup(); oms.disable();
} document.getElementById('spiderfyActive').style.visibility = 'hidden';
}); oms.removeListener('activate', function(markers) {
}else { for(var i = 0; i < markers.length; i++) {
oms.disable(); markers[i].closePopup();
document.getElementById('spiderfyActive').style.visibility = 'hidden'; }
oms.removeListener('activate', function(markers) { });
for(var i = 0; i < markers.length; i++) {
markers[i].closePopup();
}
});
} }
}); });
"; ";
return $Content; return $Content;
......
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