From 3de5beec4e93bc40a333aa04186efa8b26808040 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Mon, 2 Mar 2020 22:53:00 +0100 Subject: [PATCH] hide planes when zoomed out on mobile --- html/script.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/html/script.js b/html/script.js index 3b190d6..3ce5480 100644 --- a/html/script.js +++ b/html/script.js @@ -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;