Change ol.TileCoord to an Array

This commit is contained in:
Éric Lemoine
2014-08-15 23:33:22 +02:00
parent 0d20b337a0
commit ba035abb1f
29 changed files with 318 additions and 323 deletions

View File

@@ -2,9 +2,9 @@ goog.provide('ol.TileCache');
goog.require('goog.asserts');
goog.require('ol');
goog.require('ol.TileCoord');
goog.require('ol.TileRange');
goog.require('ol.structs.LRUCache');
goog.require('ol.tilecoord');
@@ -44,7 +44,7 @@ ol.TileCache.prototype.expireCache = function(usedTiles) {
var tile, zKey;
while (this.canExpireCache()) {
tile = /** @type {ol.Tile} */ (this.peekLast());
zKey = tile.tileCoord.z.toString();
zKey = tile.tileCoord[0].toString();
if (zKey in usedTiles && usedTiles[zKey].contains(tile.tileCoord)) {
break;
} else {
@@ -63,7 +63,7 @@ ol.TileCache.prototype.pruneTileRange = function(tileRange) {
key;
while (i--) {
key = this.peekLastKey();
if (tileRange.contains(ol.TileCoord.createFromString(key))) {
if (tileRange.contains(ol.tilecoord.createFromString(key))) {
this.pop().dispose();
} else {
this.get(key);