Rename ol.source.DebugTileSource to ol.source.TileDebug
This commit is contained in:
@@ -3,8 +3,8 @@ goog.require('ol.RendererHints');
|
|||||||
goog.require('ol.View2D');
|
goog.require('ol.View2D');
|
||||||
goog.require('ol.layer.TileLayer');
|
goog.require('ol.layer.TileLayer');
|
||||||
goog.require('ol.proj');
|
goog.require('ol.proj');
|
||||||
goog.require('ol.source.DebugTileSource');
|
|
||||||
goog.require('ol.source.OSM');
|
goog.require('ol.source.OSM');
|
||||||
|
goog.require('ol.source.TileDebug');
|
||||||
goog.require('ol.tilegrid.XYZ');
|
goog.require('ol.tilegrid.XYZ');
|
||||||
|
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ var map = new ol.Map({
|
|||||||
source: new ol.source.OSM()
|
source: new ol.source.OSM()
|
||||||
}),
|
}),
|
||||||
new ol.layer.TileLayer({
|
new ol.layer.TileLayer({
|
||||||
source: new ol.source.DebugTileSource({
|
source: new ol.source.TileDebug({
|
||||||
projection: 'EPSG:3857',
|
projection: 'EPSG:3857',
|
||||||
tileGrid: new ol.tilegrid.XYZ({
|
tileGrid: new ol.tilegrid.XYZ({
|
||||||
maxZoom: 22
|
maxZoom: 22
|
||||||
|
|||||||
@@ -457,7 +457,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.source.DebugTileSourceOptions
|
* @typedef {Object} ol.source.TileDebugOptions
|
||||||
* @property {ol.Extent|undefined} extent Extent.
|
* @property {ol.Extent|undefined} extent Extent.
|
||||||
* @property {ol.ProjectionLike} projection Projection.
|
* @property {ol.ProjectionLike} projection Projection.
|
||||||
* @property {ol.tilegrid.TileGrid|undefined} tileGrid Tile grid.
|
* @property {ol.tilegrid.TileGrid|undefined} tileGrid Tile grid.
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportClass ol.source.DebugTileSource ol.source.DebugTileSourceOptions
|
@exportClass ol.source.TileDebug ol.source.TileDebugOptions
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
goog.provide('ol.source.DebugTileSource');
|
goog.provide('ol.source.TileDebug');
|
||||||
|
|
||||||
goog.require('goog.dom');
|
goog.require('goog.dom');
|
||||||
goog.require('goog.dom.TagName');
|
goog.require('goog.dom.TagName');
|
||||||
@@ -84,9 +84,9 @@ ol.DebugTile_.prototype.getImage = function(opt_context) {
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.source.Tile}
|
* @extends {ol.source.Tile}
|
||||||
* @param {ol.source.DebugTileSourceOptions} options Debug tile options.
|
* @param {ol.source.TileDebugOptions} options Debug tile options.
|
||||||
*/
|
*/
|
||||||
ol.source.DebugTileSource = function(options) {
|
ol.source.TileDebug = function(options) {
|
||||||
|
|
||||||
goog.base(this, {
|
goog.base(this, {
|
||||||
extent: options.extent,
|
extent: options.extent,
|
||||||
@@ -102,13 +102,13 @@ ol.source.DebugTileSource = function(options) {
|
|||||||
this.tileCache_ = new ol.TileCache();
|
this.tileCache_ = new ol.TileCache();
|
||||||
|
|
||||||
};
|
};
|
||||||
goog.inherits(ol.source.DebugTileSource, ol.source.Tile);
|
goog.inherits(ol.source.TileDebug, ol.source.Tile);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.source.DebugTileSource.prototype.canExpireCache = function() {
|
ol.source.TileDebug.prototype.canExpireCache = function() {
|
||||||
return this.tileCache_.canExpireCache();
|
return this.tileCache_.canExpireCache();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ ol.source.DebugTileSource.prototype.canExpireCache = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.source.DebugTileSource.prototype.expireCache = function(usedTiles) {
|
ol.source.TileDebug.prototype.expireCache = function(usedTiles) {
|
||||||
this.tileCache_.expireCache(usedTiles);
|
this.tileCache_.expireCache(usedTiles);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ ol.source.DebugTileSource.prototype.expireCache = function(usedTiles) {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.source.DebugTileSource.prototype.getTile = function(z, x, y) {
|
ol.source.TileDebug.prototype.getTile = function(z, x, y) {
|
||||||
var tileCoordKey = ol.TileCoord.getKeyZXY(z, x, y);
|
var tileCoordKey = ol.TileCoord.getKeyZXY(z, x, y);
|
||||||
if (this.tileCache_.containsKey(tileCoordKey)) {
|
if (this.tileCache_.containsKey(tileCoordKey)) {
|
||||||
return /** @type {!ol.DebugTile_} */ (this.tileCache_.get(tileCoordKey));
|
return /** @type {!ol.DebugTile_} */ (this.tileCache_.get(tileCoordKey));
|
||||||
|
|||||||
Reference in New Issue
Block a user