# Bugfix
* fixes bug where multipolygon behaved in mapclient as single polygon, making e.g. deleting of single polygons impossible without removing everything
This commit is contained in:
parent
5551a513e9
commit
d6af6ebf45
@ -318,7 +318,7 @@ class Geometry(BaseResource):
|
|||||||
geom = self.geom
|
geom = self.geom
|
||||||
if geom.srid != srid:
|
if geom.srid != srid:
|
||||||
geom.transform(ct=srid)
|
geom.transform(ct=srid)
|
||||||
|
polygons = [p for p in geom]
|
||||||
geojson = {
|
geojson = {
|
||||||
"type": "FeatureCollection",
|
"type": "FeatureCollection",
|
||||||
"crs": {
|
"crs": {
|
||||||
@ -330,8 +330,9 @@ class Geometry(BaseResource):
|
|||||||
"features": [
|
"features": [
|
||||||
{
|
{
|
||||||
"type": "Feature",
|
"type": "Feature",
|
||||||
"geometry": json.loads(geom.json),
|
"geometry": json.loads(p.json),
|
||||||
}
|
}
|
||||||
|
for p in polygons
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
return geojson
|
return geojson
|
||||||
|
Loading…
Reference in New Issue
Block a user