Use object literals and use generic tile layer

This commit is contained in:
Tom Payne
2012-09-27 12:41:45 +02:00
parent 5ddbf17c8d
commit 65b8e0f915
37 changed files with 803 additions and 646 deletions

View File

@@ -181,8 +181,8 @@ ol.control.Attribution.prototype.getLayerAttributionVisiblities_ =
}
var mapZ;
if (source instanceof ol.TileSource) {
var tileSource = /** @type {ol.TileSource} */ source;
if (source instanceof ol.source.TileSource) {
var tileSource = /** @type {ol.source.TileSource} */ source;
var tileGrid = tileSource.getTileGrid();
mapZ = tileGrid.getZForResolution(mapResolution);
}
@@ -214,7 +214,7 @@ ol.control.Attribution.prototype.getLayerAttributionVisiblities_ =
}
if (!goog.isNull(coverageAreas)) {
if (source instanceof ol.TileSource) {
if (source instanceof ol.source.TileSource) {
attributionVisible = goog.array.some(
coverageAreas,
function(coverageArea, index) {