diff --git a/dist/leaflet_google.js b/dist/leaflet_google.js index e59c362f..36d6710e 100644 --- a/dist/leaflet_google.js +++ b/dist/leaflet_google.js @@ -139,8 +139,8 @@ L.Google = L.Class.extend({ _resize: function() { var size = this._map.getSize(); - if (this._container.style.width == size.x && - this._container.style.height == size.y) + if (parseInt(this._container.style.width) == size.x && + parseInt(this._container.style.height) == size.y) return; this._container.style.width = size.x + 'px'; this._container.style.height = size.y + 'px'; diff --git a/external/leaflet_google.js b/external/leaflet_google.js index ac5b9096..c4c323e9 100644 --- a/external/leaflet_google.js +++ b/external/leaflet_google.js @@ -139,11 +139,13 @@ L.Google = L.Class.extend({ _resize: function() { var size = this._map.getSize(); - if (this._container.style.width == size.x && - this._container.style.height == size.y) + if (parseInt(this._container.style.width) == size.x && + parseInt(this._container.style.height) == size.y) return; + this._container.style.width = size.x + 'px'; this._container.style.height = size.y + 'px'; + google.maps.event.trigger(this._google, "resize"); },