Rename ol.source.TileSource to ol.source.Tile
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
goog.provide('ol.source.TileSource');
|
||||
goog.provide('ol.source.TileSourceOptions');
|
||||
goog.provide('ol.source.Tile');
|
||||
goog.provide('ol.source.TileOptions');
|
||||
|
||||
goog.require('goog.functions');
|
||||
goog.require('ol.Attribution');
|
||||
@@ -19,16 +19,16 @@ goog.require('ol.tilegrid.TileGrid');
|
||||
* projection: ol.ProjectionLike,
|
||||
* tileGrid: (ol.tilegrid.TileGrid|undefined)}}
|
||||
*/
|
||||
ol.source.TileSourceOptions;
|
||||
ol.source.TileOptions;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.source.Source}
|
||||
* @param {ol.source.TileSourceOptions} options Tile source options.
|
||||
* @param {ol.source.TileOptions} options Tile source options.
|
||||
*/
|
||||
ol.source.TileSource = function(options) {
|
||||
ol.source.Tile = function(options) {
|
||||
|
||||
goog.base(this, {
|
||||
attributions: options.attributions,
|
||||
@@ -50,19 +50,19 @@ ol.source.TileSource = function(options) {
|
||||
this.tileGrid = goog.isDef(options.tileGrid) ? options.tileGrid : null;
|
||||
|
||||
};
|
||||
goog.inherits(ol.source.TileSource, ol.source.Source);
|
||||
goog.inherits(ol.source.Tile, ol.source.Source);
|
||||
|
||||
|
||||
/**
|
||||
* @return {boolean} Can expire cache.
|
||||
*/
|
||||
ol.source.TileSource.prototype.canExpireCache = goog.functions.FALSE;
|
||||
ol.source.Tile.prototype.canExpireCache = goog.functions.FALSE;
|
||||
|
||||
|
||||
/**
|
||||
* @param {Object.<string, ol.TileRange>} usedTiles Used tiles.
|
||||
*/
|
||||
ol.source.TileSource.prototype.expireCache = goog.abstractMethod;
|
||||
ol.source.Tile.prototype.expireCache = goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
@@ -78,7 +78,7 @@ ol.source.TileSource.prototype.expireCache = goog.abstractMethod;
|
||||
* @param {ol.TileRange} tileRange Tile range.
|
||||
* @return {boolean} The tile range is fully covered with loaded tiles.
|
||||
*/
|
||||
ol.source.TileSource.prototype.findLoadedTiles = function(loadedTilesByZ,
|
||||
ol.source.Tile.prototype.findLoadedTiles = function(loadedTilesByZ,
|
||||
getTileIfLoaded, z, tileRange) {
|
||||
// FIXME this could be more efficient about filling partial holes
|
||||
var fullyCovered = true;
|
||||
@@ -107,7 +107,7 @@ ol.source.TileSource.prototype.findLoadedTiles = function(loadedTilesByZ,
|
||||
/**
|
||||
* @return {boolean} Opaque.
|
||||
*/
|
||||
ol.source.TileSource.prototype.getOpaque = function() {
|
||||
ol.source.Tile.prototype.getOpaque = function() {
|
||||
return this.opaque_;
|
||||
};
|
||||
|
||||
@@ -115,7 +115,7 @@ ol.source.TileSource.prototype.getOpaque = function() {
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.source.TileSource.prototype.getResolutions = function() {
|
||||
ol.source.Tile.prototype.getResolutions = function() {
|
||||
return this.tileGrid.getResolutions();
|
||||
};
|
||||
|
||||
@@ -127,13 +127,13 @@ ol.source.TileSource.prototype.getResolutions = function() {
|
||||
* @param {ol.Projection=} opt_projection Projection.
|
||||
* @return {!ol.Tile} Tile.
|
||||
*/
|
||||
ol.source.TileSource.prototype.getTile = goog.abstractMethod;
|
||||
ol.source.Tile.prototype.getTile = goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.tilegrid.TileGrid} Tile grid.
|
||||
*/
|
||||
ol.source.TileSource.prototype.getTileGrid = function() {
|
||||
ol.source.Tile.prototype.getTileGrid = function() {
|
||||
return this.tileGrid;
|
||||
};
|
||||
|
||||
@@ -144,4 +144,4 @@ ol.source.TileSource.prototype.getTileGrid = function() {
|
||||
* @param {number} x Tile coordinate x.
|
||||
* @param {number} y Tile coordinate y.
|
||||
*/
|
||||
ol.source.TileSource.prototype.useTile = goog.nullFunction;
|
||||
ol.source.Tile.prototype.useTile = goog.nullFunction;
|
||||
|
||||
Reference in New Issue
Block a user