mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-04 17:23:33 +01:00
viewer: allow zooming in by one step
This commit is contained in:
parent
32c967c1e9
commit
db5dbe26d8
1 changed files with 7 additions and 2 deletions
|
@ -35,6 +35,11 @@ var MinedMapLayer = L.GridLayer.extend({
|
|||
},
|
||||
|
||||
_getTileSize: function () {
|
||||
var map = this._map, zoom = map.getZoom();
|
||||
|
||||
if (zoom > 0)
|
||||
return Math.round(map.getZoomScale(map.getZoom(), 0) * 512);
|
||||
else
|
||||
return 512;
|
||||
},
|
||||
|
||||
|
@ -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],
|
||||
|
|
Loading…
Add table
Reference in a new issue