Add new ol.source.TileJSON#getTileJSON function
This commit is contained in:
1 parent
441a7c093f
commit
4157882f2e
2 files changed
+47
-1
No files matched your search
@@ -29,6 +29,12 @@ goog.require('ol.source.TileImage');
|
||||
*/
|
||||
ol.source.TileJSON = function(options) {
|
||||
|
||||
/**
|
||||
* @type {TileJSON}
|
||||
* @private
|
||||
*/
|
||||
this.tileJSON_ = null;
|
||||
|
||||
goog.base(this, {
|
||||
attributions: options.attributions,
|
||||
cacheSize: options.cacheSize,
|
||||
@@ -85,6 +91,15 @@ ol.source.TileJSON.prototype.onXHRError_ = function(event) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {TileJSON} The tilejson object.
|
||||
* @api
|
||||
*/
|
||||
ol.source.TileJSON.prototype.getTileJSON = function() {
|
||||
return this.tileJSON_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @param {TileJSON} tileJSON Tile JSON.
|
||||
@@ -134,7 +149,7 @@ ol.source.TileJSON.prototype.handleTileJSONResponse = function(tileJSON) {
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
||||
this.tileJSON_ = tileJSON;
|
||||
this.setState(ol.source.State.READY);
|
||||
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user