Autofix indentation issues (eslint --fix)
This commit is contained in:
@@ -136,7 +136,7 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse = function(response)
|
||||
var sourceProjection = this.getProjection();
|
||||
var extent = ol.tilegrid.extentFromProjection(sourceProjection);
|
||||
var tileSize = resource.imageWidth == resource.imageHeight ?
|
||||
resource.imageWidth : [resource.imageWidth, resource.imageHeight];
|
||||
resource.imageWidth : [resource.imageWidth, resource.imageHeight];
|
||||
var tileGrid = ol.tilegrid.createXYZ({
|
||||
extent: extent,
|
||||
minZoom: resource.zoomMin,
|
||||
@@ -154,26 +154,26 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse = function(response)
|
||||
.replace('{subdomain}', subdomain)
|
||||
.replace('{culture}', culture);
|
||||
return (
|
||||
/**
|
||||
/**
|
||||
* @param {ol.TileCoord} tileCoord Tile coordinate.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {ol.proj.Projection} projection Projection.
|
||||
* @return {string|undefined} Tile URL.
|
||||
*/
|
||||
function(tileCoord, pixelRatio, projection) {
|
||||
if (!tileCoord) {
|
||||
return undefined;
|
||||
} else {
|
||||
ol.tilecoord.createOrUpdate(tileCoord[0], tileCoord[1],
|
||||
-tileCoord[2] - 1, quadKeyTileCoord);
|
||||
var url = imageUrl;
|
||||
if (hidpi) {
|
||||
url += '&dpi=d1&device=mobile';
|
||||
}
|
||||
return url.replace('{quadkey}', ol.tilecoord.quadKey(
|
||||
quadKeyTileCoord));
|
||||
function(tileCoord, pixelRatio, projection) {
|
||||
if (!tileCoord) {
|
||||
return undefined;
|
||||
} else {
|
||||
ol.tilecoord.createOrUpdate(tileCoord[0], tileCoord[1],
|
||||
-tileCoord[2] - 1, quadKeyTileCoord);
|
||||
var url = imageUrl;
|
||||
if (hidpi) {
|
||||
url += '&dpi=d1&device=mobile';
|
||||
}
|
||||
});
|
||||
return url.replace('{quadkey}', ol.tilecoord.quadKey(
|
||||
quadKeyTileCoord));
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
if (resource.imageryProviders) {
|
||||
|
||||
@@ -36,7 +36,7 @@ ol.source.Image = function(options) {
|
||||
* @type {Array.<number>}
|
||||
*/
|
||||
this.resolutions_ = options.resolutions !== undefined ?
|
||||
options.resolutions : null;
|
||||
options.resolutions : null;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -61,7 +61,7 @@ ol.source.ImageArcGISRest = function(opt_options) {
|
||||
* @type {ol.ImageLoadFunctionType}
|
||||
*/
|
||||
this.imageLoadFunction_ = options.imageLoadFunction !== undefined ?
|
||||
options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
|
||||
options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
|
||||
|
||||
|
||||
/**
|
||||
@@ -213,8 +213,8 @@ ol.source.ImageArcGISRest.prototype.getRequestUrl_ = function(extent, size, pixe
|
||||
var url = this.url_;
|
||||
|
||||
var modifiedUrl = url
|
||||
.replace(/MapServer\/?$/, 'MapServer/export')
|
||||
.replace(/ImageServer\/?$/, 'ImageServer/exportImage');
|
||||
.replace(/MapServer\/?$/, 'MapServer/export')
|
||||
.replace(/ImageServer\/?$/, 'ImageServer/exportImage');
|
||||
if (modifiedUrl == url) {
|
||||
ol.asserts.assert(false, 50); // `options.featureTypes` should be an Array
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ ol.source.ImageCanvas = function(options) {
|
||||
* @type {number}
|
||||
*/
|
||||
this.ratio_ = options.ratio !== undefined ?
|
||||
options.ratio : 1.5;
|
||||
options.ratio : 1.5;
|
||||
|
||||
};
|
||||
ol.inherits(ol.source.ImageCanvas, ol.source.Image);
|
||||
|
||||
@@ -39,7 +39,7 @@ ol.source.ImageMapGuide = function(options) {
|
||||
* @type {number}
|
||||
*/
|
||||
this.displayDpi_ = options.displayDpi !== undefined ?
|
||||
options.displayDpi : 96;
|
||||
options.displayDpi : 96;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -58,7 +58,7 @@ ol.source.ImageMapGuide = function(options) {
|
||||
* @type {ol.ImageLoadFunctionType}
|
||||
*/
|
||||
this.imageLoadFunction_ = options.imageLoadFunction !== undefined ?
|
||||
options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
|
||||
options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -71,7 +71,7 @@ ol.source.ImageMapGuide = function(options) {
|
||||
* @type {number}
|
||||
*/
|
||||
this.metersPerUnit_ = options.metersPerUnit !== undefined ?
|
||||
options.metersPerUnit : 1;
|
||||
options.metersPerUnit : 1;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -84,7 +84,7 @@ ol.source.ImageMapGuide = function(options) {
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.useOverlay_ = options.useOverlay !== undefined ?
|
||||
options.useOverlay : false;
|
||||
options.useOverlay : false;
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
||||
@@ -24,11 +24,11 @@ ol.source.ImageStatic = function(options) {
|
||||
var imageExtent = options.imageExtent;
|
||||
|
||||
var crossOrigin = options.crossOrigin !== undefined ?
|
||||
options.crossOrigin : null;
|
||||
options.crossOrigin : null;
|
||||
|
||||
var /** @type {ol.ImageLoadFunctionType} */ imageLoadFunction =
|
||||
options.imageLoadFunction !== undefined ?
|
||||
options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
|
||||
options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
|
||||
|
||||
ol.source.Image.call(this, {
|
||||
attributions: options.attributions,
|
||||
|
||||
@@ -297,6 +297,6 @@ ol.source.ImageVector.prototype.renderFeature_ = function(feature, resolution, p
|
||||
ol.source.ImageVector.prototype.setStyle = function(style) {
|
||||
this.style_ = style !== undefined ? style : ol.style.Style.defaultFunction;
|
||||
this.styleFunction_ = !style ?
|
||||
undefined : ol.style.Style.createFunction(this.style_);
|
||||
undefined : ol.style.Style.createFunction(this.style_);
|
||||
this.changed();
|
||||
};
|
||||
|
||||
@@ -55,7 +55,7 @@ ol.source.ImageWMS = function(opt_options) {
|
||||
* @type {ol.ImageLoadFunctionType}
|
||||
*/
|
||||
this.imageLoadFunction_ = options.imageLoadFunction !== undefined ?
|
||||
options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
|
||||
options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
||||
@@ -26,10 +26,10 @@ ol.source.OSM = function(opt_options) {
|
||||
}
|
||||
|
||||
var crossOrigin = options.crossOrigin !== undefined ?
|
||||
options.crossOrigin : 'anonymous';
|
||||
options.crossOrigin : 'anonymous';
|
||||
|
||||
var url = options.url !== undefined ?
|
||||
options.url : 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
options.url : 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
|
||||
ol.source.XYZ.call(this, {
|
||||
attributions: attributions,
|
||||
|
||||
@@ -46,7 +46,7 @@ ol.source.Raster = function(options) {
|
||||
* @type {ol.source.RasterOperationType}
|
||||
*/
|
||||
this.operationType_ = options.operationType !== undefined ?
|
||||
options.operationType : ol.source.RasterOperationType.PIXEL;
|
||||
options.operationType : ol.source.RasterOperationType.PIXEL;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -170,10 +170,10 @@ ol.source.Raster.prototype.setOperation = function(operation, opt_lib) {
|
||||
ol.source.Raster.prototype.updateFrameState_ = function(extent, resolution, projection) {
|
||||
|
||||
var frameState = /** @type {olx.FrameState} */ (
|
||||
ol.obj.assign({}, this.frameState_));
|
||||
ol.obj.assign({}, this.frameState_));
|
||||
|
||||
frameState.viewState = /** @type {olx.ViewState} */ (
|
||||
ol.obj.assign({}, frameState.viewState));
|
||||
ol.obj.assign({}, frameState.viewState));
|
||||
|
||||
var center = ol.extent.getCenter(extent);
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ ol.source.Source = function(options) {
|
||||
* @type {ol.source.State}
|
||||
*/
|
||||
this.state_ = options.state !== undefined ?
|
||||
options.state : ol.source.State.READY;
|
||||
options.state : ol.source.State.READY;
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
||||
@@ -23,7 +23,7 @@ ol.source.Stamen = function(options) {
|
||||
var layerConfig = ol.source.Stamen.LayerConfig[options.layer];
|
||||
|
||||
var url = options.url !== undefined ? options.url :
|
||||
'https://stamen-tiles-{a-d}.a.ssl.fastly.net/' + options.layer +
|
||||
'https://stamen-tiles-{a-d}.a.ssl.fastly.net/' + options.layer +
|
||||
'/{z}/{x}/{y}.' + layerConfig.extension;
|
||||
|
||||
ol.source.XYZ.call(this, {
|
||||
|
||||
@@ -45,7 +45,7 @@ ol.source.Tile = function(options) {
|
||||
* @type {number}
|
||||
*/
|
||||
this.tilePixelRatio_ = options.tilePixelRatio !== undefined ?
|
||||
options.tilePixelRatio : 1;
|
||||
options.tilePixelRatio : 1;
|
||||
|
||||
/**
|
||||
* @protected
|
||||
@@ -283,7 +283,7 @@ ol.source.Tile.prototype.getTilePixelSize = function(z, pixelRatio, projection)
|
||||
*/
|
||||
ol.source.Tile.prototype.getTileCoordForTileUrlFunction = function(tileCoord, opt_projection) {
|
||||
var projection = opt_projection !== undefined ?
|
||||
opt_projection : this.getProjection();
|
||||
opt_projection : this.getProjection();
|
||||
var tileGrid = this.getTileGridForProjection(projection);
|
||||
if (this.getWrapX() && projection.isGlobal()) {
|
||||
tileCoord = ol.tilegrid.wrapX(tileGrid, tileCoord, projection);
|
||||
|
||||
@@ -95,7 +95,7 @@ ol.source.TileArcGISRest.prototype.getParams = function() {
|
||||
* @private
|
||||
*/
|
||||
ol.source.TileArcGISRest.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileExtent,
|
||||
pixelRatio, projection, params) {
|
||||
pixelRatio, projection, params) {
|
||||
|
||||
var urls = this.urls;
|
||||
if (!urls) {
|
||||
@@ -111,7 +111,7 @@ ol.source.TileArcGISRest.prototype.getRequestUrl_ = function(tileCoord, tileSize
|
||||
params['IMAGESR'] = srid;
|
||||
params['DPI'] = Math.round(
|
||||
params['DPI'] ? params['DPI'] * pixelRatio : 90 * pixelRatio
|
||||
);
|
||||
);
|
||||
|
||||
var url;
|
||||
if (urls.length == 1) {
|
||||
|
||||
@@ -46,7 +46,7 @@ ol.source.TileDebug.prototype.getTile = function(z, x, y) {
|
||||
var tileCoord = [z, x, y];
|
||||
var textTileCoord = this.getTileCoordForTileUrlFunction(tileCoord);
|
||||
var text = !textTileCoord ? '' :
|
||||
this.getTileCoordForTileUrlFunction(textTileCoord).toString();
|
||||
this.getTileCoordForTileUrlFunction(textTileCoord).toString();
|
||||
var tile = new ol.source.TileDebug.Tile_(tileCoord, tileSize, text);
|
||||
this.tileCache.set(tileCoordKey, tile);
|
||||
return tile;
|
||||
|
||||
@@ -34,7 +34,7 @@ ol.source.TileImage = function(options) {
|
||||
state: options.state,
|
||||
tileGrid: options.tileGrid,
|
||||
tileLoadFunction: options.tileLoadFunction ?
|
||||
options.tileLoadFunction : ol.source.TileImage.defaultTileLoadFunction,
|
||||
options.tileLoadFunction : ol.source.TileImage.defaultTileLoadFunction,
|
||||
tilePixelRatio: options.tilePixelRatio,
|
||||
tileUrlFunction: options.tileUrlFunction,
|
||||
url: options.url,
|
||||
@@ -55,7 +55,7 @@ ol.source.TileImage = function(options) {
|
||||
* ?string, ol.TileLoadFunctionType)}
|
||||
*/
|
||||
this.tileClass = options.tileClass !== undefined ?
|
||||
options.tileClass : ol.ImageTile;
|
||||
options.tileClass : ol.ImageTile;
|
||||
|
||||
/**
|
||||
* @protected
|
||||
@@ -216,7 +216,7 @@ ol.source.TileImage.prototype.createTile_ = function(z, x, y, pixelRatio, projec
|
||||
var urlTileCoord = this.getTileCoordForTileUrlFunction(
|
||||
tileCoord, projection);
|
||||
var tileUrl = urlTileCoord ?
|
||||
this.tileUrlFunction(urlTileCoord, pixelRatio, projection) : undefined;
|
||||
this.tileUrlFunction(urlTileCoord, pixelRatio, projection) : undefined;
|
||||
var tile = new this.tileClass(
|
||||
tileCoord,
|
||||
tileUrl !== undefined ? ol.TileState.IDLE : ol.TileState.EMPTY,
|
||||
|
||||
@@ -137,7 +137,7 @@ ol.source.TileJSON.prototype.handleTileJSONResponse = function(tileJSON) {
|
||||
|
||||
if (tileJSON.attribution !== undefined && !this.getAttributions()) {
|
||||
var attributionExtent = extent !== undefined ?
|
||||
extent : epsg4326Projection.getExtent();
|
||||
extent : epsg4326Projection.getExtent();
|
||||
/** @type {Object.<string, Array.<ol.TileRange>>} */
|
||||
var tileRanges = {};
|
||||
var z, zKey;
|
||||
|
||||
@@ -36,7 +36,7 @@ ol.source.TileUTFGrid = function(options) {
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.preemptive_ = options.preemptive !== undefined ?
|
||||
options.preemptive : true;
|
||||
options.preemptive : true;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -197,7 +197,7 @@ ol.source.TileUTFGrid.prototype.handleTileJSONResponse = function(tileJSON) {
|
||||
|
||||
if (tileJSON.attribution !== undefined) {
|
||||
var attributionExtent = extent !== undefined ?
|
||||
extent : epsg4326Projection.getExtent();
|
||||
extent : epsg4326Projection.getExtent();
|
||||
/** @type {Object.<string, Array.<ol.TileRange>>} */
|
||||
var tileRanges = {};
|
||||
var z, zKey;
|
||||
|
||||
@@ -200,7 +200,7 @@ ol.source.TileWMS.prototype.getParams = function() {
|
||||
* @private
|
||||
*/
|
||||
ol.source.TileWMS.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileExtent,
|
||||
pixelRatio, projection, params) {
|
||||
pixelRatio, projection, params) {
|
||||
|
||||
var urls = this.urls;
|
||||
if (!urls) {
|
||||
@@ -268,7 +268,7 @@ ol.source.TileWMS.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileE
|
||||
*/
|
||||
ol.source.TileWMS.prototype.getTilePixelRatio = function(pixelRatio) {
|
||||
return (!this.hidpi_ || this.serverType_ === undefined) ? 1 :
|
||||
/** @type {number} */ (pixelRatio);
|
||||
/** @type {number} */ (pixelRatio);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@ ol.source.UrlTile = function(options) {
|
||||
* @type {ol.TileUrlFunctionType}
|
||||
*/
|
||||
this.tileUrlFunction = this.fixedTileUrlFunction ?
|
||||
this.fixedTileUrlFunction.bind(this) :
|
||||
ol.TileUrlFunction.nullTileUrlFunction;
|
||||
this.fixedTileUrlFunction.bind(this) :
|
||||
ol.TileUrlFunction.nullTileUrlFunction;
|
||||
|
||||
/**
|
||||
* @protected
|
||||
@@ -165,8 +165,8 @@ ol.source.UrlTile.prototype.setTileUrlFunction = function(tileUrlFunction, opt_k
|
||||
ol.source.UrlTile.prototype.setUrl = function(url) {
|
||||
var urls = this.urls = ol.TileUrlFunction.expandUrl(url);
|
||||
this.setTileUrlFunction(this.fixedTileUrlFunction ?
|
||||
this.fixedTileUrlFunction.bind(this) :
|
||||
ol.TileUrlFunction.createFromTemplates(urls, this.tileGrid), url);
|
||||
this.fixedTileUrlFunction.bind(this) :
|
||||
ol.TileUrlFunction.createFromTemplates(urls, this.tileGrid), url);
|
||||
};
|
||||
|
||||
|
||||
@@ -179,8 +179,8 @@ ol.source.UrlTile.prototype.setUrls = function(urls) {
|
||||
this.urls = urls;
|
||||
var key = urls.join('\n');
|
||||
this.setTileUrlFunction(this.fixedTileUrlFunction ?
|
||||
this.fixedTileUrlFunction.bind(this) :
|
||||
ol.TileUrlFunction.createFromTemplates(urls, this.tileGrid), key);
|
||||
this.fixedTileUrlFunction.bind(this) :
|
||||
ol.TileUrlFunction.createFromTemplates(urls, this.tileGrid), key);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ ol.source.Vector = function(opt_options) {
|
||||
* @type {ol.LoadingStrategy}
|
||||
*/
|
||||
this.strategy_ = options.strategy !== undefined ? options.strategy :
|
||||
ol.loadingstrategy.all;
|
||||
ol.loadingstrategy.all;
|
||||
|
||||
var useSpatialIndex =
|
||||
options.useSpatialIndex !== undefined ? options.useSpatialIndex : true;
|
||||
|
||||
@@ -38,7 +38,7 @@ ol.source.VectorTile = function(options) {
|
||||
state: options.state,
|
||||
tileGrid: options.tileGrid,
|
||||
tileLoadFunction: options.tileLoadFunction ?
|
||||
options.tileLoadFunction : ol.VectorImageTile.defaultLoadFunction,
|
||||
options.tileLoadFunction : ol.VectorImageTile.defaultLoadFunction,
|
||||
tileUrlFunction: options.tileUrlFunction,
|
||||
tilePixelRatio: options.tilePixelRatio,
|
||||
url: options.url,
|
||||
@@ -105,7 +105,7 @@ ol.source.VectorTile.prototype.getTile = function(z, x, y, pixelRatio, projectio
|
||||
var urlTileCoord = this.getTileCoordForTileUrlFunction(
|
||||
tileCoord, projection);
|
||||
var tileUrl = urlTileCoord ?
|
||||
this.tileUrlFunction(urlTileCoord, pixelRatio, projection) : undefined;
|
||||
this.tileUrlFunction(urlTileCoord, pixelRatio, projection) : undefined;
|
||||
var tile = new ol.VectorImageTile(
|
||||
tileCoord,
|
||||
tileUrl !== undefined ? ol.TileState.IDLE : ol.TileState.EMPTY,
|
||||
@@ -143,8 +143,8 @@ ol.source.VectorTile.prototype.getTileGridForProjection = function(projection) {
|
||||
*/
|
||||
ol.source.VectorTile.prototype.getTilePixelRatio = function(opt_pixelRatio) {
|
||||
return opt_pixelRatio == undefined ?
|
||||
ol.source.UrlTile.prototype.getTilePixelRatio.call(this, opt_pixelRatio) :
|
||||
opt_pixelRatio;
|
||||
ol.source.UrlTile.prototype.getTilePixelRatio.call(this, opt_pixelRatio) :
|
||||
opt_pixelRatio;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -74,8 +74,8 @@ ol.source.WMTS = function(options) {
|
||||
* @type {ol.source.WMTSRequestEncoding}
|
||||
*/
|
||||
this.requestEncoding_ = options.requestEncoding !== undefined ?
|
||||
/** @type {ol.source.WMTSRequestEncoding} */ (options.requestEncoding) :
|
||||
ol.source.WMTSRequestEncoding.KVP;
|
||||
/** @type {ol.source.WMTSRequestEncoding} */ (options.requestEncoding) :
|
||||
ol.source.WMTSRequestEncoding.KVP;
|
||||
|
||||
var requestEncoding = this.requestEncoding_;
|
||||
|
||||
@@ -113,45 +113,45 @@ ol.source.WMTS = function(options) {
|
||||
// special template params
|
||||
|
||||
template = (requestEncoding == ol.source.WMTSRequestEncoding.KVP) ?
|
||||
ol.uri.appendParams(template, context) :
|
||||
template.replace(/\{(\w+?)\}/g, function(m, p) {
|
||||
return (p.toLowerCase() in context) ? context[p.toLowerCase()] : m;
|
||||
});
|
||||
ol.uri.appendParams(template, context) :
|
||||
template.replace(/\{(\w+?)\}/g, function(m, p) {
|
||||
return (p.toLowerCase() in context) ? context[p.toLowerCase()] : m;
|
||||
});
|
||||
|
||||
return (
|
||||
/**
|
||||
/**
|
||||
* @param {ol.TileCoord} tileCoord Tile coordinate.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {ol.proj.Projection} projection Projection.
|
||||
* @return {string|undefined} Tile URL.
|
||||
*/
|
||||
function(tileCoord, pixelRatio, projection) {
|
||||
if (!tileCoord) {
|
||||
return undefined;
|
||||
function(tileCoord, pixelRatio, projection) {
|
||||
if (!tileCoord) {
|
||||
return undefined;
|
||||
} else {
|
||||
var localContext = {
|
||||
'TileMatrix': tileGrid.getMatrixId(tileCoord[0]),
|
||||
'TileCol': tileCoord[1],
|
||||
'TileRow': -tileCoord[2] - 1
|
||||
};
|
||||
ol.obj.assign(localContext, dimensions);
|
||||
var url = template;
|
||||
if (requestEncoding == ol.source.WMTSRequestEncoding.KVP) {
|
||||
url = ol.uri.appendParams(url, localContext);
|
||||
} else {
|
||||
var localContext = {
|
||||
'TileMatrix': tileGrid.getMatrixId(tileCoord[0]),
|
||||
'TileCol': tileCoord[1],
|
||||
'TileRow': -tileCoord[2] - 1
|
||||
};
|
||||
ol.obj.assign(localContext, dimensions);
|
||||
var url = template;
|
||||
if (requestEncoding == ol.source.WMTSRequestEncoding.KVP) {
|
||||
url = ol.uri.appendParams(url, localContext);
|
||||
} else {
|
||||
url = url.replace(/\{(\w+?)\}/g, function(m, p) {
|
||||
return localContext[p];
|
||||
});
|
||||
}
|
||||
return url;
|
||||
url = url.replace(/\{(\w+?)\}/g, function(m, p) {
|
||||
return localContext[p];
|
||||
});
|
||||
}
|
||||
});
|
||||
return url;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var tileUrlFunction = (urls && urls.length > 0) ?
|
||||
ol.TileUrlFunction.createFromTileUrlFunctions(
|
||||
urls.map(createFromWMTSTemplate)) :
|
||||
ol.TileUrlFunction.nullTileUrlFunction;
|
||||
ol.TileUrlFunction.createFromTileUrlFunctions(
|
||||
urls.map(createFromWMTSTemplate)) :
|
||||
ol.TileUrlFunction.nullTileUrlFunction;
|
||||
|
||||
ol.source.TileImage.call(this, {
|
||||
attributions: options.attributions,
|
||||
@@ -335,9 +335,9 @@ ol.source.WMTS.optionsFromCapabilities = function(wmtsCap, config) {
|
||||
idx = 0;
|
||||
}
|
||||
matrixSet = /** @type {string} */
|
||||
(l['TileMatrixSetLink'][idx]['TileMatrixSet']);
|
||||
(l['TileMatrixSetLink'][idx]['TileMatrixSet']);
|
||||
matrixLimits = /** @type {Array.<Object>} */
|
||||
(l['TileMatrixSetLink'][idx]['TileMatrixSetLimits']);
|
||||
(l['TileMatrixSetLink'][idx]['TileMatrixSetLimits']);
|
||||
|
||||
var format = /** @type {string} */ (l['Format'][0]);
|
||||
if ('format' in config) {
|
||||
|
||||
@@ -30,15 +30,15 @@ goog.require('ol.tilegrid');
|
||||
ol.source.XYZ = function(opt_options) {
|
||||
var options = opt_options || {};
|
||||
var projection = options.projection !== undefined ?
|
||||
options.projection : 'EPSG:3857';
|
||||
options.projection : 'EPSG:3857';
|
||||
|
||||
var tileGrid = options.tileGrid !== undefined ? options.tileGrid :
|
||||
ol.tilegrid.createXYZ({
|
||||
extent: ol.tilegrid.extentFromProjection(projection),
|
||||
maxZoom: options.maxZoom,
|
||||
minZoom: options.minZoom,
|
||||
tileSize: options.tileSize
|
||||
});
|
||||
ol.tilegrid.createXYZ({
|
||||
extent: ol.tilegrid.extentFromProjection(projection),
|
||||
maxZoom: options.maxZoom,
|
||||
minZoom: options.minZoom,
|
||||
tileSize: options.tileSize
|
||||
});
|
||||
|
||||
ol.source.TileImage.call(this, {
|
||||
attributions: options.attributions,
|
||||
|
||||
@@ -26,8 +26,8 @@ ol.source.Zoomify = function(opt_options) {
|
||||
|
||||
var size = options.size;
|
||||
var tierSizeCalculation = options.tierSizeCalculation !== undefined ?
|
||||
options.tierSizeCalculation :
|
||||
ol.source.Zoomify.TierSizeCalculation_.DEFAULT;
|
||||
options.tierSizeCalculation :
|
||||
ol.source.Zoomify.TierSizeCalculation_.DEFAULT;
|
||||
|
||||
var imageWidth = size[0];
|
||||
var imageHeight = size[1];
|
||||
|
||||
Reference in New Issue
Block a user