X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6bde69a840794523e54bdf1a3f99f0c413c0d974..a4b5485405ee1b45209302d1d34733199ffd33cb:/app/assets/javascripts/map.js.erb diff --git a/app/assets/javascripts/map.js.erb b/app/assets/javascripts/map.js.erb index a18292aaa..928575eb5 100644 --- a/app/assets/javascripts/map.js.erb +++ b/app/assets/javascripts/map.js.erb @@ -29,6 +29,10 @@ L.extend(L.LatLngBounds.prototype, { getSize: function () { return (this._northEast.lat - this._southWest.lat) * (this._northEast.lng - this._southWest.lng); + }, + + wrap: function () { + return new L.LatLngBounds(this._southWest.wrap(), this._northEast.wrap()); } });