Spaces:
Runtime error
Runtime error
Commit
·
4fc0ad0
1
Parent(s):
70db2ce
Added download button for building
Browse files
tomorrowcities/pages/engine.py
CHANGED
|
@@ -336,6 +336,10 @@ def LayerDisplayer():
|
|
| 336 |
solara.DataFrame(df.cx[xmin:xmax,ymin:ymax].drop(columns='geometry'))
|
| 337 |
else:
|
| 338 |
solara.DataFrame(df)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 339 |
|
| 340 |
|
| 341 |
@solara.component
|
|
|
|
| 336 |
solara.DataFrame(df.cx[xmin:xmax,ymin:ymax].drop(columns='geometry'))
|
| 337 |
else:
|
| 338 |
solara.DataFrame(df)
|
| 339 |
+
if selected == "building":
|
| 340 |
+
file_object = df.to_json()
|
| 341 |
+
with solara.FileDownload(file_object, "building_export.geojson", mime_type="application/geo+json"):
|
| 342 |
+
solara.Button("Download GeoJSON", icon_name="mdi-cloud-download-outline", color="primary")
|
| 343 |
|
| 344 |
|
| 345 |
@solara.component
|