mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-01-16 04:31:31 +01:00
Fixed tabs.
This commit is contained in:
parent
cce30da6be
commit
eaf6ecde26
@ -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 = '';
|
|
||||||
if(this.options.nightandday && this.options.dynmap.serverday)
|
|
||||||
dnprefix = '_day';
|
|
||||||
|
|
||||||
var extrazoom = this.options.mapzoomout;
|
var dnprefix = '';
|
||||||
if(zoom < extrazoom) {
|
if(this.options.nightandday && this.options.dynmap.serverday) {
|
||||||
var scale = 1 << (extrazoom-zoom);
|
dnprefix = '_day';
|
||||||
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';
|
|
||||||
} else {
|
var extrazoom = this.options.mapzoomout;
|
||||||
tileName = this.options.prefix + dnprefix + '/' + (tilePoint.x >> 5) + '_' + ((-tilePoint.y) >> 5) + '/' + tilePoint.x + '_' + (-tilePoint.y) + '.png';
|
if(zoom < extrazoom) {
|
||||||
}
|
var scale = 1 << (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';
|
||||||
|
} else {
|
||||||
|
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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user