From e495e498a72cb61d5f48c8b9878822d17e65a2b9 Mon Sep 17 00:00:00 2001 From: Lorenzo Natali Date: Tue, 19 Jan 2016 18:40:23 +0100 Subject: [PATCH] implemented openlayers bing maxNativeZoom parameter with default --- web/client/components/map/openlayers/plugins/BingLayer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/client/components/map/openlayers/plugins/BingLayer.js b/web/client/components/map/openlayers/plugins/BingLayer.js index 080b48beed..f5b88516dd 100644 --- a/web/client/components/map/openlayers/plugins/BingLayer.js +++ b/web/client/components/map/openlayers/plugins/BingLayer.js @@ -12,6 +12,7 @@ var ol = require('openlayers'); Layers.registerType('bing', { create: (options) => { var key = options.apiKey; + var maxNativeZoom = options.maxNativeZoom || 19; return new ol.layer.Tile({ preload: Infinity, opacity: options.opacity !== undefined ? options.opacity : 1, @@ -19,7 +20,8 @@ Layers.registerType('bing', { visible: options.visibility, source: new ol.source.BingMaps({ key: key, - imagerySet: options.name + imagerySet: options.name, + maxZoom: maxNativeZoom }) }); }