Rename _ol_source_UrlTile_ to UrlTile

This commit is contained in:
Tim Schaub
2018-01-08 16:03:55 -07:00
parent 32ee149909
commit 231c8837ca
5 changed files with 36 additions and 36 deletions

View File

@@ -18,7 +18,7 @@ import _ol_tilecoord_ from '../tilecoord.js';
* @extends {ol.source.Tile}
* @param {ol.SourceUrlTileOptions} options Image tile options.
*/
var _ol_source_UrlTile_ = function(options) {
var UrlTile = function(options) {
TileSource.call(this, {
attributions: options.attributions,
@@ -69,21 +69,21 @@ var _ol_source_UrlTile_ = function(options) {
};
inherits(_ol_source_UrlTile_, TileSource);
inherits(UrlTile, TileSource);
/**
* @type {ol.TileUrlFunctionType|undefined}
* @protected
*/
_ol_source_UrlTile_.prototype.fixedTileUrlFunction;
UrlTile.prototype.fixedTileUrlFunction;
/**
* Return the tile load function of the source.
* @return {ol.TileLoadFunctionType} TileLoadFunction
* @api
*/
_ol_source_UrlTile_.prototype.getTileLoadFunction = function() {
UrlTile.prototype.getTileLoadFunction = function() {
return this.tileLoadFunction;
};
@@ -93,7 +93,7 @@ _ol_source_UrlTile_.prototype.getTileLoadFunction = function() {
* @return {ol.TileUrlFunctionType} TileUrlFunction
* @api
*/
_ol_source_UrlTile_.prototype.getTileUrlFunction = function() {
UrlTile.prototype.getTileUrlFunction = function() {
return this.tileUrlFunction;
};
@@ -105,7 +105,7 @@ _ol_source_UrlTile_.prototype.getTileUrlFunction = function() {
* @return {!Array.<string>|null} URLs.
* @api
*/
_ol_source_UrlTile_.prototype.getUrls = function() {
UrlTile.prototype.getUrls = function() {
return this.urls;
};
@@ -115,7 +115,7 @@ _ol_source_UrlTile_.prototype.getUrls = function() {
* @param {ol.events.Event} event Event.
* @protected
*/
_ol_source_UrlTile_.prototype.handleTileChange = function(event) {
UrlTile.prototype.handleTileChange = function(event) {
var tile = /** @type {ol.Tile} */ (event.target);
var uid = getUid(tile);
var tileState = tile.getState();
@@ -140,7 +140,7 @@ _ol_source_UrlTile_.prototype.handleTileChange = function(event) {
* @param {ol.TileLoadFunctionType} tileLoadFunction Tile load function.
* @api
*/
_ol_source_UrlTile_.prototype.setTileLoadFunction = function(tileLoadFunction) {
UrlTile.prototype.setTileLoadFunction = function(tileLoadFunction) {
this.tileCache.clear();
this.tileLoadFunction = tileLoadFunction;
this.changed();
@@ -153,7 +153,7 @@ _ol_source_UrlTile_.prototype.setTileLoadFunction = function(tileLoadFunction) {
* @param {string=} opt_key Optional new tile key for the source.
* @api
*/
_ol_source_UrlTile_.prototype.setTileUrlFunction = function(tileUrlFunction, opt_key) {
UrlTile.prototype.setTileUrlFunction = function(tileUrlFunction, opt_key) {
this.tileUrlFunction = tileUrlFunction;
this.tileCache.pruneExceptNewestZ();
if (typeof opt_key !== 'undefined') {
@@ -169,7 +169,7 @@ _ol_source_UrlTile_.prototype.setTileUrlFunction = function(tileUrlFunction, opt
* @param {string} url URL.
* @api
*/
_ol_source_UrlTile_.prototype.setUrl = function(url) {
UrlTile.prototype.setUrl = function(url) {
var urls = this.urls = expandUrl(url);
this.setTileUrlFunction(this.fixedTileUrlFunction ?
this.fixedTileUrlFunction.bind(this) :
@@ -182,7 +182,7 @@ _ol_source_UrlTile_.prototype.setUrl = function(url) {
* @param {Array.<string>} urls URLs.
* @api
*/
_ol_source_UrlTile_.prototype.setUrls = function(urls) {
UrlTile.prototype.setUrls = function(urls) {
this.urls = urls;
var key = urls.join('\n');
this.setTileUrlFunction(this.fixedTileUrlFunction ?
@@ -194,10 +194,10 @@ _ol_source_UrlTile_.prototype.setUrls = function(urls) {
/**
* @inheritDoc
*/
_ol_source_UrlTile_.prototype.useTile = function(z, x, y) {
UrlTile.prototype.useTile = function(z, x, y) {
var tileCoordKey = _ol_tilecoord_.getKeyZXY(z, x, y);
if (this.tileCache.containsKey(tileCoordKey)) {
this.tileCache.get(tileCoordKey);
}
};
export default _ol_source_UrlTile_;
export default UrlTile;