Spaces:
Sleeping
Sleeping
Remove modebar in plot
Browse files
app.py
CHANGED
|
@@ -109,6 +109,15 @@ def gr_generate_map(
|
|
| 109 |
center = (7.665643, 80.9529867)
|
| 110 |
elif region == "Seruwila":
|
| 111 |
center = (8.335057, 81.320460)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
if token:
|
| 113 |
fig.update_layout(
|
| 114 |
mapbox=dict(
|
|
@@ -128,6 +137,7 @@ def gr_generate_map(
|
|
| 128 |
],
|
| 129 |
}
|
| 130 |
],
|
|
|
|
| 131 |
)
|
| 132 |
else:
|
| 133 |
fig.update_layout(
|
|
@@ -139,6 +149,7 @@ def gr_generate_map(
|
|
| 139 |
pitch=0,
|
| 140 |
zoom=6 if region == "None" else 13,
|
| 141 |
),
|
|
|
|
| 142 |
)
|
| 143 |
|
| 144 |
return fig, prefix + ".zip", prefix + ".csv"
|
|
|
|
| 109 |
center = (7.665643, 80.9529867)
|
| 110 |
elif region == "Seruwila":
|
| 111 |
center = (8.335057, 81.320460)
|
| 112 |
+
modebar_icons = [
|
| 113 |
+
"lasso",
|
| 114 |
+
"select",
|
| 115 |
+
"pan",
|
| 116 |
+
"zoomin",
|
| 117 |
+
"zoomout",
|
| 118 |
+
"toImage",
|
| 119 |
+
"resetview",
|
| 120 |
+
]
|
| 121 |
if token:
|
| 122 |
fig.update_layout(
|
| 123 |
mapbox=dict(
|
|
|
|
| 137 |
],
|
| 138 |
}
|
| 139 |
],
|
| 140 |
+
modebar_remove=modebar_icons,
|
| 141 |
)
|
| 142 |
else:
|
| 143 |
fig.update_layout(
|
|
|
|
| 149 |
pitch=0,
|
| 150 |
zoom=6 if region == "None" else 13,
|
| 151 |
),
|
| 152 |
+
modebar_remove=modebar_icons,
|
| 153 |
)
|
| 154 |
|
| 155 |
return fig, prefix + ".zip", prefix + ".csv"
|