add scale

This commit is contained in:
2019-02-10 18:51:44 +01:00
parent 9499e2c7c9
commit 8a3c951b65
4 changed files with 36 additions and 9 deletions

View File

@@ -286,6 +286,9 @@ function initSpotMessages(aoMessages, aoTracks) {
return $('<div>', {'class':'leaflet-control-layers leaflet-control leaflet-control-layers-expanded'}).append($('<section>').append($Labels))[0];
};
oProjects.addTo(oMap);
//Scale
L.control.scale({imperial: false, 'position':'bottomright'}).addTo(oMap);
}
function getBoundsZoomLevel(bounds, mapDim) {
@@ -396,6 +399,7 @@ function getPost(asPost) {
.hover(function(){
var oMarker = oSpot.tmp(['markers', $(this).data('id')]);
if(oSpot.tmp('map').getBounds().contains(oMarker.getLatLng())) oMarker.togglePopup();
else if(oMarker.isPopupOpen()) oMarker.closePopup();
});
break;
case 'picture':