X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/6bde69a840794523e54bdf1a3f99f0c413c0d974..1f8bbc25746968d3a5859118d83c8f8b2f539230:/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()); } });