summaryrefslogtreecommitdiffstats
path: root/viewer
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-02-02 10:53:23 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-02-02 10:53:23 +0100
commitdb5dbe26d8bb9e247870df2792ae28dd936e356d (patch)
tree5adc27dadd9aa263f08387da4099615c71d5783e /viewer
parent32c967c1e9fbdb58f5f9817011327edf6497d85a (diff)
downloadMinedMap-db5dbe26d8bb9e247870df2792ae28dd936e356d.tar
MinedMap-db5dbe26d8bb9e247870df2792ae28dd936e356d.zip
viewer: allow zooming in by one step
Diffstat (limited to 'viewer')
-rw-r--r--viewer/MinedMap.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/viewer/MinedMap.js b/viewer/MinedMap.js
index 577421b..d566fff 100644
--- a/viewer/MinedMap.js
+++ b/viewer/MinedMap.js
@@ -35,7 +35,12 @@ var MinedMapLayer = L.GridLayer.extend({
},
_getTileSize: function () {
- return 512;
+ var map = this._map, zoom = map.getZoom();
+
+ if (zoom > 0)
+ return Math.round(map.getZoomScale(map.getZoom(), 0) * 512);
+ else
+ return 512;
},
_onTileRemove: function (e) {
@@ -69,7 +74,7 @@ window.createMap = function () {
center: [0, 0],
zoom: 0,
minZoom: 0,
- maxZoom: 0,
+ maxZoom: 1,
crs: L.CRS.Simple,
maxBounds: [
[-512*(info.info.maxZ+1), 512*info.info.minX],