demarches-normaliennes/app/services/geojson_service.rb
2015-11-25 10:26:55 +01:00

12 lines
No EOL
205 B
Ruby

class GeojsonService
def self.to_json_polygon coordinates
polygon = {
geo: {
type: "Polygon",
coordinates: [coordinates]
}
}
polygon.to_json
end
end