Fixed tabs.

This commit is contained in:
FrozenCow 2011-07-18 03:51:16 +02:00
parent cce30da6be
commit eaf6ecde26

View File

@ -21,20 +21,21 @@ var HDMapType = DynmapTileLayer.extend({
this.projection = new HDProjection({worldtomap: options.worldtomap}) this.projection = new HDProjection({worldtomap: options.worldtomap})
}, },
getTileName: function(tilePoint, zoom) { getTileName: function(tilePoint, zoom) {
var tileName; var tileName;
var dnprefix = ''; var dnprefix = '';
if(this.options.nightandday && this.options.dynmap.serverday) if(this.options.nightandday && this.options.dynmap.serverday) {
dnprefix = '_day'; dnprefix = '_day';
}
var extrazoom = this.options.mapzoomout; var extrazoom = this.options.mapzoomout;
if(zoom < extrazoom) { if(zoom < extrazoom) {
var scale = 1 << (extrazoom-zoom); var scale = 1 << (extrazoom-zoom);
var zprefix = "zzzzzzzzzzzzzzzzzzzzzz".substring(0, extrazoom-zoom); var zprefix = "zzzzzzzzzzzzzzzzzzzzzz".substring(0, extrazoom-zoom);
tileName = this.options.prefix + dnprefix + '/' + ((scale*tilePoint.x) >> 5) + '_' + ((-scale*tilePoint.y) >> 5) + '/' + zprefix + "_" + (scale*tilePoint.x) + '_' + (-scale*tilePoint.y) + '.png'; tileName = this.options.prefix + dnprefix + '/' + ((scale*tilePoint.x) >> 5) + '_' + ((-scale*tilePoint.y) >> 5) + '/' + zprefix + "_" + (scale*tilePoint.x) + '_' + (-scale*tilePoint.y) + '.png';
} else { } else {
tileName = this.options.prefix + dnprefix + '/' + (tilePoint.x >> 5) + '_' + ((-tilePoint.y) >> 5) + '/' + tilePoint.x + '_' + (-tilePoint.y) + '.png'; tileName = this.options.prefix + dnprefix + '/' + (tilePoint.x >> 5) + '_' + ((-tilePoint.y) >> 5) + '/' + tilePoint.x + '_' + (-tilePoint.y) + '.png';
} }
return tileName; return tileName;
}, },
calculateTileSize: function(zoom) { calculateTileSize: function(zoom) {