From db9ced339420bcd58ebada29cb9a333944884bd0 Mon Sep 17 00:00:00 2001 From: FrozenCow Date: Sun, 13 Feb 2011 22:42:08 +0100 Subject: [PATCH] Fixed tiles not updating. --- web/kzedmaps.js | 4 ++-- web/map.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/kzedmaps.js b/web/kzedmaps.js index d541ef11..a2c0687f 100644 --- a/web/kzedmaps.js +++ b/web/kzedmaps.js @@ -49,7 +49,7 @@ KzedMapType.prototype = $.extend(new DynMapType(), { tileSize = 128; imgSize = tileSize; - tileName = 'z' + this.prefix + '_' + (-coord.x * tileSize*2) + '_' + (coord.y * tileSize*2); + tileName = 'z' + this.prefix + '_' + (-coord.x * tileSize*2) + '_' + (coord.y * tileSize*2) + '.png'; } else { // Other zoom levels. tileSize = 128; @@ -72,7 +72,7 @@ KzedMapType.prototype = $.extend(new DynMapType(), { tileSize = imgSize; if (offset.x == 0 && offset.y == 0) { - tileName = this.prefix + '_' + (-mapcoord.x) + '_' + mapcoord.y; + tileName = this.prefix + '_' + (-mapcoord.x) + '_' + mapcoord.y + '.png'; } offset = {x: 0, y: 0}; // The next line is not: diff --git a/web/map.js b/web/map.js index 0eb3f00a..379e160e 100644 --- a/web/map.js +++ b/web/map.js @@ -454,9 +454,9 @@ DynMap.prototype = { var tile = me.registeredTiles[tileName]; if(tile) { - return me.options.tileUrl + me.world + '/' + tileName + '.png?' + tile.lastseen; + return me.options.tileUrl + me.world + '/' + tileName + '?' + tile.lastseen; } else { - return me.options.tileUrl + me.world + '/' + tileName + '.png?0'; + return me.options.tileUrl + me.world + '/' + tileName + '?0'; } }, registerTile: function(mapType, tileName, tile) {