Show area and length on champ carto selections utilisateur
This commit is contained in:
parent
54d37bdb5d
commit
9cb612bb3d
6 changed files with 106 additions and 1 deletions
|
@ -49,6 +49,17 @@ module ChampHelper
|
|||
"#{geo_area.commune} : #{geo_area.nom}"
|
||||
when GeoArea.sources.fetch(:parcelle_agricole)
|
||||
"Culture : #{geo_area.culture} - Surface : #{geo_area.surface} ha"
|
||||
when GeoArea.sources.fetch(:selection_utilisateur)
|
||||
if geo_area.polygon?
|
||||
capture do
|
||||
concat "Une aire de surface #{geo_area.area} m"
|
||||
concat content_tag(:sup, "2")
|
||||
end
|
||||
elsif geo_area.line?
|
||||
"Une ligne longue de #{geo_area.length} m"
|
||||
elsif geo_area.point?
|
||||
"Un point situé à #{geo_area.location}"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue