Support minZoom in ol.source.Stamen

This commit is contained in:
Frederic Junod
2016-03-23 12:39:39 +01:00
parent cc9d4d8794
commit 548e4abd35
4 changed files with 11 additions and 4 deletions

View File

@@ -70,7 +70,7 @@ ol.source.StamenProviderConfig = {
maxZoom: 20
},
'watercolor': {
minZoom: 3,
minZoom: 1,
maxZoom: 16
}
};
@@ -106,8 +106,7 @@ ol.source.Stamen = function(options) {
cacheSize: options.cacheSize,
crossOrigin: 'anonymous',
maxZoom: providerConfig.maxZoom,
// FIXME uncomment the following when tilegrid supports minZoom
//minZoom: providerConfig.minZoom,
minZoom: providerConfig.minZoom,
opaque: layerConfig.opaque,
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
tileLoadFunction: options.tileLoadFunction,

View File

@@ -33,6 +33,7 @@ ol.source.XYZ = function(options) {
ol.tilegrid.createXYZ({
extent: ol.tilegrid.extentFromProjection(projection),
maxZoom: options.maxZoom,
minZoom: options.minZoom,
tileSize: options.tileSize
});