Use tile keys instead of coord keys

This change ensures that tiles with old params or dimensions are discarded
This commit is contained in:
Andreas Hocevar
2016-07-14 01:03:30 +02:00
parent 57af1a9b24
commit d259ab893e
3 changed files with 3 additions and 4 deletions

View File

@@ -937,8 +937,7 @@ ol.Map.prototype.getTilePriority = function(tile, tileSourceKey, tileCenter, til
if (!frameState || !(tileSourceKey in frameState.wantedTiles)) {
return ol.structs.PriorityQueue.DROP;
}
var coordKey = tile.tileCoord.toString();
if (!frameState.wantedTiles[tileSourceKey][coordKey]) {
if (!frameState.wantedTiles[tileSourceKey][tile.getKey()]) {
return ol.structs.PriorityQueue.DROP;
}
// Prioritize the highest zoom level tiles closest to the focus.