diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js b/loleaflet/src/map/handler/Map.TouchGesture.js index 3171e2794..6081c8539 100644 --- a/loleaflet/src/map/handler/Map.TouchGesture.js +++ b/loleaflet/src/map/handler/Map.TouchGesture.js @@ -341,8 +341,9 @@ L.Map.TouchGesture = L.Handler.extend({ // we need to invert the offset or the map is moved in the opposite direction var offset = {x: e.center.x - this._pinchStartCenter.x, y: e.center.y - this._pinchStartCenter.y}; var center = {x: this._pinchStartCenter.x - offset.x, y: this._pinchStartCenter.y - offset.y}; - this._center = this._map.mouseEventToLatLng({clientX: center.x, clientY: center.y}); this._zoom = this._map.getScaleZoom(e.scale); + this._center = this._map._limitCenter(this._map.mouseEventToLatLng({clientX: center.x, clientY: center.y}), + this._zoom, this._map.options.maxBounds); L.Util.cancelAnimFrame(this._animRequest); this._animRequest = L.Util.requestAnimFrame(function () {