Add render options for vector tile layers
This commit is contained in:
@@ -472,10 +472,15 @@ ol.tilegrid.TileGrid.prototype.getFullTileRange = function(z) {
|
||||
|
||||
/**
|
||||
* @param {number} resolution Resolution.
|
||||
* @param {number=} opt_direction If 0, the nearest resolution will be used.
|
||||
* If 1, the nearest lower resolution will be used. If -1, the nearest
|
||||
* higher resolution will be used. Default is 0.
|
||||
* @return {number} Z.
|
||||
*/
|
||||
ol.tilegrid.TileGrid.prototype.getZForResolution = function(resolution) {
|
||||
var z = ol.array.linearFindNearest(this.resolutions_, resolution, 0);
|
||||
ol.tilegrid.TileGrid.prototype.getZForResolution = function(
|
||||
resolution, opt_direction) {
|
||||
var z = ol.array.linearFindNearest(this.resolutions_, resolution,
|
||||
opt_direction || 0);
|
||||
return ol.math.clamp(z, this.minZoom, this.maxZoom);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user