Spaces:
Build error
Build error
Merge pull request #14 from buuck/satellite_view
Browse files- app.py +2 -1
- utils/indicators.py +3 -1
app.py
CHANGED
@@ -37,7 +37,8 @@ with gr.Blocks() as demo:
|
|
37 |
projects = dq.list_projects_by_author(author_id=username)
|
38 |
# Initialize the first project in the list
|
39 |
project_names = projects['name'].tolist()
|
40 |
-
|
|
|
41 |
|
42 |
# Change the project name in the index generator object when the
|
43 |
# user selects a new project
|
|
|
37 |
projects = dq.list_projects_by_author(author_id=username)
|
38 |
# Initialize the first project in the list
|
39 |
project_names = projects['name'].tolist()
|
40 |
+
default_project = project_names[0]
|
41 |
+
return gr.Dropdown.update(choices=project_names, value=default_project)
|
42 |
|
43 |
# Change the project name in the index generator object when the
|
44 |
# user selects a new project
|
utils/indicators.py
CHANGED
@@ -275,7 +275,8 @@ class IndexGenerator:
|
|
275 |
|
276 |
fig.update_layout(
|
277 |
mapbox={
|
278 |
-
"style": "
|
|
|
279 |
"center": {"lon": bbox_center[0], "lat": bbox_center[1]},
|
280 |
"zoom": zoom,
|
281 |
"layers": [
|
@@ -287,6 +288,7 @@ class IndexGenerator:
|
|
287 |
"type": "fill",
|
288 |
"below": "traces",
|
289 |
"color": "royalblue",
|
|
|
290 |
}
|
291 |
],
|
292 |
},
|
|
|
275 |
|
276 |
fig.update_layout(
|
277 |
mapbox={
|
278 |
+
"style": "satellite",
|
279 |
+
"accesstoken":os.environ['MAPBOX_ACCESS_TOKEN'],
|
280 |
"center": {"lon": bbox_center[0], "lat": bbox_center[1]},
|
281 |
"zoom": zoom,
|
282 |
"layers": [
|
|
|
288 |
"type": "fill",
|
289 |
"below": "traces",
|
290 |
"color": "royalblue",
|
291 |
+
"opacity": 0.5,
|
292 |
}
|
293 |
],
|
294 |
},
|