Use tile scale cache suffix for scale above 1 only (#440)
The tile params formatting is used for caching. Don't add the @1x suffix for scale 1, in order to re-use old cache from before retina tiles were enabled
This commit is contained in:
parent
e10e55fcac
commit
ecc928b910
@ -125,7 +125,8 @@ class TileCache {
|
||||
|
||||
private cacheLocation({tileset, z, x, y, scale}: TileParams): CacheLocation {
|
||||
const dir = `${this.basePath}/${tileset}/${z}/${x}`;
|
||||
const fname = `${dir}/${y}@${scale}x.png`;
|
||||
const scaleSuffix = scale === 1 ? '' : `@${scale}x`;
|
||||
const fname = `${dir}/${y}${scaleSuffix}.png`;
|
||||
return { dir, fname };
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user