[view/map][xs] Small fix in the getBounds method (does not work for multi-geometries)
This commit is contained in:
parent
3597974469
commit
653eda6f43
@ -448,8 +448,10 @@ my.Map = Backbone.View.extend({
|
||||
if (layer instanceof L.Marker){
|
||||
bounds.extend(layer.getLatLng());
|
||||
} else {
|
||||
bounds.extend(layer.getBounds().getNorthEast());
|
||||
bounds.extend(layer.getBounds().getSouthWest());
|
||||
if (layer.getBounds){
|
||||
bounds.extend(layer.getBounds().getNorthEast());
|
||||
bounds.extend(layer.getBounds().getSouthWest());
|
||||
}
|
||||
}
|
||||
}, this);
|
||||
return (typeof bounds.getNorthEast() !== 'undefined') ? bounds : null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user