mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-25 03:35:18 +01:00
Merge pull request #364 from mikeprimm/master
Fix zoom range and marker position calculation on Kzed and Flat
This commit is contained in:
commit
6d75c9ea44
@ -536,6 +536,7 @@ public class FlatMap extends MapType {
|
|||||||
s(o, "backgroundnight", c.getString("backgroundnight"));
|
s(o, "backgroundnight", c.getString("backgroundnight"));
|
||||||
s(o, "bigmap", this.isBigWorldMap(world));
|
s(o, "bigmap", this.isBigWorldMap(world));
|
||||||
s(o, "mapzoomin", c.getInteger("mapzoomin", 3));
|
s(o, "mapzoomin", c.getInteger("mapzoomin", 3));
|
||||||
|
s(o, "mapzoomout", world.getExtraZoomOutLevels());
|
||||||
s(o, "compassview", "S"); /* Always from south */
|
s(o, "compassview", "S"); /* Always from south */
|
||||||
a(worldObject, "maps", o);
|
a(worldObject, "maps", o);
|
||||||
}
|
}
|
||||||
|
@ -587,6 +587,7 @@ public class DefaultTileRenderer implements MapTileRenderer {
|
|||||||
s(o, "backgroundnight", c.getString("backgroundnight"));
|
s(o, "backgroundnight", c.getString("backgroundnight"));
|
||||||
s(o, "bigmap", map.isBigWorldMap(world));
|
s(o, "bigmap", map.isBigWorldMap(world));
|
||||||
s(o, "mapzoomin", c.getInteger("mapzoomin", 3));
|
s(o, "mapzoomin", c.getInteger("mapzoomin", 3));
|
||||||
|
s(o, "mapzoomout", world.getExtraZoomOutLevels()+1);
|
||||||
s(o, "compassview", "SE"); /* Always from southeast */
|
s(o, "compassview", "SE"); /* Always from southeast */
|
||||||
a(worldObject, "maps", o);
|
a(worldObject, "maps", o);
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,7 @@ var FlatMapType = DynmapTileLayer.extend({
|
|||||||
errorTileUrl: 'images/blank.png'
|
errorTileUrl: 'images/blank.png'
|
||||||
},
|
},
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
options.maxzoomout = options.mapzoomout || options.world.extrazoomout;
|
options.maxZoom = options.mapzoomin + options.mapzoomout;
|
||||||
options.maxZoom = options.mapzoomin + options.maxzoomout;
|
|
||||||
L.Util.setOptions(this, options);
|
L.Util.setOptions(this, options);
|
||||||
this.projection = new FlatProjection({mapzoomout: options.mapzoomout});
|
this.projection = new FlatProjection({mapzoomout: options.mapzoomout});
|
||||||
},
|
},
|
||||||
|
@ -20,7 +20,6 @@ var KzedMapType = DynmapTileLayer.extend({
|
|||||||
errorTileUrl: 'images/blank.png'
|
errorTileUrl: 'images/blank.png'
|
||||||
},
|
},
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
options.mapzoomout = options.mapzoomout || options.world.extrazoomout;
|
|
||||||
options.maxZoom = options.mapzoomin + options.mapzoomout;
|
options.maxZoom = options.mapzoomin + options.mapzoomout;
|
||||||
L.Util.setOptions(this, options);
|
L.Util.setOptions(this, options);
|
||||||
this.projection = new KzedProjection({mapzoomout: this.options.mapzoomout});
|
this.projection = new KzedProjection({mapzoomout: this.options.mapzoomout});
|
||||||
|
Loading…
Reference in New Issue
Block a user