demarches-normaliennes/app/services/geojson_service.rb

12 lines
205 B
Ruby
Raw Normal View History

2015-11-23 18:41:48 +01:00
class GeojsonService
2015-11-25 10:26:55 +01:00
def self.to_json_polygon coordinates
polygon = {
2015-11-23 18:41:48 +01:00
geo: {
type: "Polygon",
coordinates: [coordinates]
}
}
2015-11-25 10:26:55 +01:00
polygon.to_json
2015-11-23 18:41:48 +01:00
end
end