Add get_cadastre on TPS carte page and display on leaflet map

This commit is contained in:
Xavier J 2016-01-15 11:53:00 +01:00
parent 6d4b29cf36
commit 2ce8e4734b
14 changed files with 283 additions and 91 deletions

View file

@ -1,5 +1,5 @@
class GeojsonService
def self.to_json_polygon coordinates
def self.to_json_polygon_for_qp coordinates
polygon = {
geo: {
type: "Polygon",
@ -9,4 +9,21 @@ class GeojsonService
polygon.to_json
end
def self.to_json_polygon_for_cadastre coordinates
polygon = {
geom: {
type: "Feature",
geometry: {
type: "Polygon",
coordinates: [
coordinates
]
}
}
}
polygon.to_json
end
end