Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ sys.path.append(parent_dir)
|
|
| 9 |
|
| 10 |
|
| 11 |
import ee
|
| 12 |
-
#
|
| 13 |
service_account = 'earthengine@ee-yudingyi054.iam.gserviceaccount.com'
|
| 14 |
credentials = ee.ServiceAccountCredentials(service_account, 'ee-yudingyi054-64e93ae89dc1.json')
|
| 15 |
|
|
@@ -291,7 +291,7 @@ def server(input, output, session):
|
|
| 291 |
|
| 292 |
# Initialize and display when the session starts (1)
|
| 293 |
map = L.Map(center=(current_gps['location']['lat'], current_gps['location']['lng']), zoom=12, scroll_wheel_zoom=True)
|
| 294 |
-
map.add_layer(L.TileLayer(url='https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}'
|
| 295 |
|
| 296 |
# Add a distance scale
|
| 297 |
map.add_control(L.leaflet.ScaleControl(position="bottomleft"))
|
|
|
|
| 9 |
|
| 10 |
|
| 11 |
import ee
|
| 12 |
+
# Add Google Service account credential. Authenticates to the Earth Engine servers.
|
| 13 |
service_account = 'earthengine@ee-yudingyi054.iam.gserviceaccount.com'
|
| 14 |
credentials = ee.ServiceAccountCredentials(service_account, 'ee-yudingyi054-64e93ae89dc1.json')
|
| 15 |
|
|
|
|
| 291 |
|
| 292 |
# Initialize and display when the session starts (1)
|
| 293 |
map = L.Map(center=(current_gps['location']['lat'], current_gps['location']['lng']), zoom=12, scroll_wheel_zoom=True)
|
| 294 |
+
map.add_layer(L.TileLayer(url='https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', name='Natural Map'))
|
| 295 |
|
| 296 |
# Add a distance scale
|
| 297 |
map.add_control(L.leaflet.ScaleControl(position="bottomleft"))
|