diff --git a/src/map/handler/Map.DoubleClickZoom.js b/src/map/handler/Map.DoubleClickZoom.js index 6399734e..8f381406 100644 --- a/src/map/handler/Map.DoubleClickZoom.js +++ b/src/map/handler/Map.DoubleClickZoom.js @@ -17,7 +17,8 @@ L.Map.DoubleClickZoom = L.Handler.extend({ _onDoubleClick: function (e) { var map = this._map, - zoom = map.getZoom() + (e.originalEvent.shiftKey ? -1 : 1); + oldZoom = map.getZoom(), + zoom = e.originalEvent.shiftKey ? Math.ceil(oldZoom) - 1 : Math.floor(oldZoom) + 1; if (map.options.doubleClickZoom === 'center') { map.setZoom(zoom); diff --git a/src/map/handler/Map.TouchZoom.js b/src/map/handler/Map.TouchZoom.js index ab90795e..32e9d915 100644 --- a/src/map/handler/Map.TouchZoom.js +++ b/src/map/handler/Map.TouchZoom.js @@ -103,7 +103,7 @@ L.Map.TouchZoom = L.Handler.extend({ var map = this._map, oldZoom = map.getZoom(), zoomDelta = this._zoom - oldZoom, - finalZoom = map._limitZoom(oldZoom + (zoomDelta > 0 ? Math.ceil(zoomDelta) : Math.floor(zoomDelta))); + finalZoom = map._limitZoom(zoomDelta > 0 ? Math.ceil(this._zoom) : Math.floor(this._zoom)); map._animateZoom(this._center, finalZoom, true); },