Fix a crash in case of invalid geometry
This commit is contained in:
parent
a1b32ae419
commit
6556df2a85
5 changed files with 83 additions and 38 deletions
|
@ -58,8 +58,8 @@ class Champs::CarteChamp < Champ
|
|||
bounding_box = RGeo::Cartesian::BoundingBox.new(factory)
|
||||
|
||||
if geo_areas.present?
|
||||
geo_areas.each do |area|
|
||||
bounding_box.add(area.rgeo_geometry)
|
||||
geo_areas.map(&:rgeo_geometry).compact.each do |geometry|
|
||||
bounding_box.add(geometry)
|
||||
end
|
||||
elsif dossier.present?
|
||||
point = dossier.geo_position
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue