Commit 720ec0f5 authored by Eric's avatar Eric
Browse files

enhancement: small message in top center of map when the spiderfy effect is active.

parent 3efd76da
...@@ -1162,6 +1162,7 @@ function create_MapImage() ...@@ -1162,6 +1162,7 @@ function create_MapImage()
currZoom = e.target._zoom; currZoom = e.target._zoom;
if(currZoom >= 12) { if(currZoom >= 12) {
oms.enable(); oms.enable();
document.getElementById('spiderfyActive').style.visibility = 'visible';
oms.addListener('activate', function(markers) { oms.addListener('activate', function(markers) {
for(var i = 0; i < markers.length; i++) { for(var i = 0; i < markers.length; i++) {
markers[i].closePopup(); markers[i].closePopup();
...@@ -1169,6 +1170,7 @@ function create_MapImage() ...@@ -1169,6 +1170,7 @@ function create_MapImage()
}); });
}else { }else {
oms.disable(); oms.disable();
document.getElementById('spiderfyActive').style.visibility = 'hidden';
oms.removeListener('activate', function(markers) { oms.removeListener('activate', function(markers) {
for(var i = 0; i < markers.length; i++) { for(var i = 0; i < markers.length; i++) {
markers[i].closePopup(); markers[i].closePopup();
......
...@@ -359,3 +359,19 @@ MAP_DETAILS { ...@@ -359,3 +359,19 @@ MAP_DETAILS {
padding-right: 5px; padding-right: 5px;
padding-left: 5px; padding-left: 5px;
} }
#spiderfyActive {
background: black;
color: white;
opacity: 0.5;
position: absolute;
width: 158px;
font-size: 1em;
text-align: center;
z-index: 9999;
top: 2px;
left: 50%;
right: 50%;
border-radius: 5px;
visibility: hidden;
}
...@@ -570,7 +570,7 @@ $scaling = <<<EOD ...@@ -570,7 +570,7 @@ $scaling = <<<EOD
EOD; EOD;
echo $scaling; echo $scaling;
echo "<div id='spiderfyActive'>SPIDERFY ACTIVE</div>\n";
echo "</body>\n"; echo "</body>\n";
echo "</html>\n"; echo "</html>\n";
?> ?>
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