Merge pull request #11646 from ahocevar/unique-tile-key

Ensure a unique tile key for each tile coordinate
This commit is contained in:
Andreas Hocevar
2020-10-20 21:12:04 +02:00
committed by GitHub
3 changed files with 5 additions and 15 deletions

View File

@@ -39,6 +39,8 @@ class ImageTile extends Tile {
*/
this.src_ = src;
this.key = src;
/**
* @private
* @type {HTMLImageElement|HTMLCanvasElement}
@@ -70,13 +72,6 @@ class ImageTile extends Tile {
return this.image_;
}
/**
* @return {string} Key.
*/
getKey() {
return this.src_;
}
/**
* Tracks loading or read errors.
*

View File

@@ -63,6 +63,8 @@ class VectorTile extends Tile {
* @type {string}
*/
this.url_ = src;
this.key = src;
}
/**
@@ -83,13 +85,6 @@ class VectorTile extends Tile {
return this.features_;
}
/**
* @return {string} Key.
*/
getKey() {
return this.url_;
}
/**
* Load not yet loaded URI.
*/