aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modern/src/map/Map.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/modern/src/map/Map.js b/modern/src/map/Map.js
index bbb1f5ce..4bdf2fd9 100644
--- a/modern/src/map/Map.js
+++ b/modern/src/map/Map.js
@@ -42,10 +42,8 @@ const onIdle = function () {
}
};
-const isRasterMap = map => Object.values(map.getStyle().sources).some(e => e.type === 'raster');
-
const setAllowedZoomLevels = map => {
- if(isRasterMap(map)) {
+ if (Object.values(map.getStyle().sources).some(e => e.type === 'raster')) {
map.scrollZoom.setWheelZoomRate(1);
map.on('idle', onIdle);
} else {