prevent LeafletGoogle from always triggering the resize event on GoogleMaps.
This is broken upstream, too, but the author of the project has been unresponsive for the past half year.
This commit is contained in:
parent
4be5efe306
commit
9418ac3f86
4
dist/leaflet_google.js
vendored
4
dist/leaflet_google.js
vendored
@ -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';
|
||||
|
6
external/leaflet_google.js
vendored
6
external/leaflet_google.js
vendored
@ -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");
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user