X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/a89d75d3d8824c2a4c2c3567083afc986c3b18a6..406e93de958e2c88b4fe5a5ff58ad6c6c0b16539:/vendor/assets/leaflet/leaflet.js diff --git a/vendor/assets/leaflet/leaflet.js b/vendor/assets/leaflet/leaflet.js index 17fbc626b..b972941d9 100644 --- a/vendor/assets/leaflet/leaflet.js +++ b/vendor/assets/leaflet/leaflet.js @@ -1752,6 +1752,7 @@ L.Map = L.Class.extend({ var oldSize = this.getSize(); this._sizeChanged = true; + this._initialCenter = null; if (this.options.maxBounds) { this.setMaxBounds(this.options.maxBounds); @@ -1825,7 +1826,7 @@ L.Map = L.Class.extend({ getCenter: function () { // (Boolean) -> LatLng this._checkIfLoaded(); - if (!this._moved()) { + if (this._initialCenter && !this._moved()) { return this._initialCenter; } return this.layerPointToLatLng(this._getCenterLayerPoint());