mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-25 03:35:18 +01:00
Merge pull request #361 from mikeprimm/master
Fix flat and kzed 'bigworld' support
This commit is contained in:
commit
8cef3fb478
@ -151,7 +151,6 @@ var DynmapTileLayer = L.TileLayer.extend({
|
||||
var izoom = this.options.maxZoom - zoom;
|
||||
var zoomoutlevel = Math.max(0, izoom - this.options.mapzoomin);
|
||||
var scale = 1 << zoomoutlevel;
|
||||
var zoomprefix = this.zoomprefix(zoomoutlevel);
|
||||
var x = scale*tilePoint.x;
|
||||
var y = scale*tilePoint.y;
|
||||
return {
|
||||
@ -160,6 +159,7 @@ var DynmapTileLayer = L.TileLayer.extend({
|
||||
scaledx: x >> 5,
|
||||
scaledy: y >> 5,
|
||||
zoom: this.zoomprefix(zoomoutlevel),
|
||||
zoomprefix: (zoomoutlevel==0)?"":(this.zoomprefix(zoomoutlevel)+"_"),
|
||||
x: x,
|
||||
y: y
|
||||
};
|
||||
|
@ -21,7 +21,7 @@ var FlatMapType = DynmapTileLayer.extend({
|
||||
},
|
||||
getTileName: function(tilePoint, zoom) {
|
||||
return namedReplace(this.options.bigmap
|
||||
? '{prefix}{nightday}_128/{scaledx}_{scaledy}/{zoom}_{x}_{y}.png'
|
||||
? '{prefix}{nightday}_128/{scaledx}_{scaledy}/{zoomprefix}{x}_{y}.png'
|
||||
: '{zoom}{prefix}{nightday}_128_{x}_{y}.png'
|
||||
, this.getTileInfo(tilePoint, zoom));
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ var KzedMapType = DynmapTileLayer.extend({
|
||||
getTileName: function(tilePoint, zoom) {
|
||||
var info = this.getTileInfo(tilePoint, zoom);
|
||||
return namedReplace(this.options.bigmap
|
||||
? '{prefix}{nightday}/{scaledx}_{scaledy}/{zoom}_{x}_{y}.png'
|
||||
? '{prefix}{nightday}/{scaledx}_{scaledy}/{zoomprefix}{x}_{y}.png'
|
||||
: '{zoom}{prefix}{nightday}_{x}_{y}.png'
|
||||
, this.getTileInfo(tilePoint, zoom));
|
||||
},
|
||||
@ -37,7 +37,6 @@ var KzedMapType = DynmapTileLayer.extend({
|
||||
var izoom = this.options.maxZoom - zoom;
|
||||
var zoomoutlevel = Math.max(0, izoom - this.options.mapzoomin);
|
||||
var scale = 1 << zoomoutlevel;
|
||||
var zoomprefix = this.zoomprefix(zoomoutlevel);
|
||||
var x = -scale*tilePoint.x*128;
|
||||
var y = scale*tilePoint.y*128;
|
||||
return {
|
||||
@ -46,6 +45,7 @@ var KzedMapType = DynmapTileLayer.extend({
|
||||
scaledx: x >> 12,
|
||||
scaledy: y >> 12,
|
||||
zoom: this.zoomprefix(zoomoutlevel),
|
||||
zoomprefix: (zoomoutlevel==0)?"":(this.zoomprefix(zoomoutlevel)+"_"),
|
||||
x: x,
|
||||
y: y
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user