Add opaque flag to ol.source.TileSource

This commit is contained in:
Tom Payne
2013-02-19 16:50:48 +01:00
parent 44e3e228eb
commit fb668a7fc6
9 changed files with 30 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ goog.require('ol.tilegrid.TileGrid');
/**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* extent: (ol.Extent|undefined),
* opaque: (boolean|undefined),
* projection: (ol.Projection|undefined),
* tileGrid: (ol.tilegrid.TileGrid|undefined)}}
*/
@@ -35,6 +36,13 @@ ol.source.TileSource = function(tileSourceOptions) {
projection: tileSourceOptions.projection
});
/**
* @private
* @type {boolean}
*/
this.opaque_ = goog.isDef(tileSourceOptions.opaque) ?
tileSourceOptions.opaque : false;
/**
* @protected
* @type {ol.tilegrid.TileGrid}
@@ -98,6 +106,14 @@ ol.source.TileSource.prototype.findLoadedTiles = function(loadedTilesByZ,
};
/**
* @return {boolean} Opaque.
*/
ol.source.TileSource.prototype.getOpaque = function() {
return this.opaque_;
};
/**
* @inheritDoc
*/