Merge pull request #364 from mikeprimm/master

Fix zoom range and marker position calculation on Kzed and Flat
This commit is contained in:
mikeprimm 2011-08-02 19:54:06 -07:00
commit 6d75c9ea44
4 changed files with 3 additions and 3 deletions

View File

@ -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);
} }

View File

@ -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);
} }

View File

@ -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});
}, },

View File

@ -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});