Add get_cadastre on TPS carte page and display on leaflet map
This commit is contained in:
parent
6d4b29cf36
commit
2ce8e4734b
14 changed files with 283 additions and 91 deletions
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue