From b611aff8e4e8f282b6c2a94542ccde61fe4f7759 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 26 Aug 2014 14:21:32 +0200 Subject: [PATCH] Set default ol.source.OSM maxZoom to 19 --- externs/olx.js | 2 +- src/ol/source/osmsource.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/externs/olx.js b/externs/olx.js index b7ae6e73ea..8ffffbe3b6 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -3905,7 +3905,7 @@ olx.source.OSMOptions.prototype.crossOrigin; /** - * Max zoom. + * Max zoom. Default is `19`. * @type {number|undefined} * @api */ diff --git a/src/ol/source/osmsource.js b/src/ol/source/osmsource.js index 2d8e80257d..2d757c306a 100644 --- a/src/ol/source/osmsource.js +++ b/src/ol/source/osmsource.js @@ -37,7 +37,7 @@ ol.source.OSM = function(opt_options) { attributions: attributions, crossOrigin: crossOrigin, opaque: true, - maxZoom: options.maxZoom, + maxZoom: goog.isDef(options.maxZoom) ? options.maxZoom : 19, tileLoadFunction: options.tileLoadFunction, url: url });