Expose multiple user selections on champ carte
This commit is contained in:
parent
55e99a323c
commit
22604013d0
14 changed files with 230 additions and 245 deletions
|
@ -14,21 +14,4 @@ class GeojsonService
|
|||
|
||||
polygon.to_json
|
||||
end
|
||||
|
||||
def self.to_json_polygon_for_selection_utilisateur(coordinates)
|
||||
coordinates = coordinates.map do |lat_longs|
|
||||
outbounds = lat_longs.map do |lat_long|
|
||||
[lat_long['lng'], lat_long['lat']]
|
||||
end
|
||||
|
||||
[outbounds]
|
||||
end
|
||||
|
||||
polygon = {
|
||||
type: 'MultiPolygon',
|
||||
coordinates: coordinates
|
||||
}
|
||||
|
||||
polygon.to_json
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue