hide planes when zoomed out on mobile
This commit is contained in:
@@ -537,6 +537,9 @@ function initialize() {
|
||||
|
||||
onMobile = window.mobilecheck();
|
||||
|
||||
if (onMobile)
|
||||
enableMouseover = false;
|
||||
|
||||
var largeModeStorage = localStorage['largeMode'];
|
||||
if (largeModeStorage != undefined && parseInt(largeModeStorage, 10)) {
|
||||
largeMode = parseInt(largeModeStorage, 10);
|
||||
@@ -3355,6 +3358,14 @@ function changeZoom(init) {
|
||||
|
||||
ZoomLvl = OLMap.getView().getZoom();
|
||||
|
||||
if (onMobile) {
|
||||
if (ZoomLvl < 7.5) {
|
||||
iconLayer.setVisible(false);
|
||||
} else {
|
||||
iconLayer.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
// small zoomstep, no need to change aircraft scaling
|
||||
if (!init && Math.abs(ZoomLvl-ZoomLvlCache) < 0.4)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user