Refactor to support stricter new compiler
This commit is contained in:
@@ -217,15 +217,8 @@ ol.control.Attribution.prototype.getLayerAttributionVisiblities_ =
|
|||||||
if (store instanceof ol.TileStore) {
|
if (store instanceof ol.TileStore) {
|
||||||
attributionVisible = goog.array.some(
|
attributionVisible = goog.array.some(
|
||||||
coverageAreas,
|
coverageAreas,
|
||||||
/**
|
function(coverageArea, index) {
|
||||||
* @param {ol.TileCoverageArea} tileCoverageArea
|
return coverageArea.intersectsExtentAndZ(mapExtent, mapZ);
|
||||||
* Tile coverage area.
|
|
||||||
* @param {number} index Index.
|
|
||||||
*/
|
|
||||||
function(tileCoverageArea, index) {
|
|
||||||
goog.asserts.assert(
|
|
||||||
tileCoverageArea instanceof ol.TileCoverageArea);
|
|
||||||
return tileCoverageArea.intersectsExtentAndZ(mapExtent, mapZ);
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
attributionVisible = goog.array.some(
|
attributionVisible = goog.array.some(
|
||||||
|
|||||||
@@ -35,6 +35,14 @@ ol.CoverageArea.prototype.intersectsExtent = function(extent) {
|
|||||||
ol.CoverageArea.prototype.intersectsExtentAndResolution = goog.abstractMethod;
|
ol.CoverageArea.prototype.intersectsExtentAndResolution = goog.abstractMethod;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {ol.Extent} extent Extent.
|
||||||
|
* @param {number} z Z.
|
||||||
|
* @return {boolean} Intersects.
|
||||||
|
*/
|
||||||
|
ol.CoverageArea.prototype.intersectsExtentAndZ = goog.abstractMethod;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.TransformFunction} transformFn Transform.
|
* @param {ol.TransformFunction} transformFn Transform.
|
||||||
* @return {ol.CoverageArea} Transformed coverage area.
|
* @return {ol.CoverageArea} Transformed coverage area.
|
||||||
|
|||||||
@@ -51,9 +51,7 @@ ol.TileCoverageArea.prototype.intersectsExtentAndResolution =
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.Extent} extent Extent.
|
* @inheritDoc
|
||||||
* @param {number} z Z.
|
|
||||||
* @return {boolean} Intersects.
|
|
||||||
*/
|
*/
|
||||||
ol.TileCoverageArea.prototype.intersectsExtentAndZ = function(extent, z) {
|
ol.TileCoverageArea.prototype.intersectsExtentAndZ = function(extent, z) {
|
||||||
return this.minZ_ <= z && z <= this.maxZ_ && this.intersectsExtent(extent);
|
return this.minZ_ <= z && z <= this.maxZ_ && this.intersectsExtent(extent);
|
||||||
|
|||||||
Reference in New Issue
Block a user