Improve handling of tile URLs

This commit is contained in:
James Lyne 2020-12-22 18:51:40 +00:00
parent 367deec7d1
commit c739a062a3

View File

@ -113,7 +113,7 @@ export class DynmapTileLayer extends TileLayer {
url = `${window.config.url.tiles}${path}`; url = `${window.config.url.tiles}${path}`;
if(typeof timestamp !== 'undefined') { if(typeof timestamp !== 'undefined') {
url += `&timestamp=${timestamp}`; url += (url.indexOf('?') === -1 ? `?timestamp=${timestamp}` : `&timestamp=${timestamp}`);
} }
this._cachedTileUrls.set(name, url); this._cachedTileUrls.set(name, url);