Consistent use of ol.tilecoord.getKeyZXY()
This commit is contained in:
@@ -5,8 +5,10 @@ goog.require('ol.proj');
|
||||
goog.require('ol.proj.Projection');
|
||||
goog.require('ol.source.Source');
|
||||
goog.require('ol.source.Tile');
|
||||
goog.require('ol.tilecoord');
|
||||
goog.require('ol.tilegrid.TileGrid');
|
||||
|
||||
|
||||
/**
|
||||
* Tile source for tests that uses a EPSG:4326 based grid with 4 resolutions and
|
||||
* 256x256 tiles.
|
||||
@@ -40,7 +42,7 @@ ol.inherits(MockTile, ol.source.Tile);
|
||||
* @inheritDoc
|
||||
*/
|
||||
MockTile.prototype.getTile = function(z, x, y) {
|
||||
var key = this.getKeyZXY(z, x, y);
|
||||
var key = ol.tilecoord.getKeyZXY(z, x, y);
|
||||
if (this.tileCache.containsKey(key)) {
|
||||
return /** @type {!ol.Tile} */ (this.tileCache.get(key));
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
goog.require('ol.ImageTile');
|
||||
goog.require('ol.TileState');
|
||||
goog.require('ol.TileUrlFunction');
|
||||
@@ -9,6 +7,7 @@ goog.require('ol.proj.EPSG3857');
|
||||
goog.require('ol.proj.Projection');
|
||||
goog.require('ol.reproj.Tile');
|
||||
goog.require('ol.source.TileImage');
|
||||
goog.require('ol.tilecoord');
|
||||
goog.require('ol.tilegrid');
|
||||
|
||||
|
||||
@@ -52,7 +51,7 @@ describe('ol.source.TileImage', function() {
|
||||
expect(source.getKey()).to.be('');
|
||||
source.getTileInternal(0, 0, -1, 1, ol.proj.get('EPSG:3857'));
|
||||
expect(source.tileCache.getCount()).to.be(1);
|
||||
tile = source.tileCache.get(source.getKeyZXY(0, 0, -1));
|
||||
tile = source.tileCache.get(ol.tilecoord.getKeyZXY(0, 0, -1));
|
||||
});
|
||||
|
||||
it('gets the tile from the cache', function() {
|
||||
|
||||
Reference in New Issue
Block a user