From 07397d16e13333fbdbdb45cd9a88c235ab1f6df3 Mon Sep 17 00:00:00 2001 From: Qiusheng Wu Date: Wed, 17 Jul 2024 21:55:06 -0400 Subject: [PATCH] Add service account --- pages/02_inspector.py | 2 ++ pages/03_plotting.py | 2 ++ pages/04_split_map.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/pages/02_inspector.py b/pages/02_inspector.py index 67beb9e..0771760 100644 --- a/pages/02_inspector.py +++ b/pages/02_inspector.py @@ -5,6 +5,8 @@ import solara service_account = os.environ.get("EARTHENGINE_SERVICE_ACCOUNT", False) +if isinstance(service_account, str): + service_account = True geemap.ee_initialize(service_account=service_account) diff --git a/pages/03_plotting.py b/pages/03_plotting.py index fa79dfe..521b41e 100644 --- a/pages/03_plotting.py +++ b/pages/03_plotting.py @@ -5,6 +5,8 @@ import solara service_account = os.environ.get("EARTHENGINE_SERVICE_ACCOUNT", False) +if isinstance(service_account, str): + service_account = True geemap.ee_initialize(service_account=service_account) diff --git a/pages/04_split_map.py b/pages/04_split_map.py index e2f0617..4d6281f 100644 --- a/pages/04_split_map.py +++ b/pages/04_split_map.py @@ -5,6 +5,8 @@ import solara service_account = os.environ.get("EARTHENGINE_SERVICE_ACCOUNT", False) +if isinstance(service_account, str): + service_account = True geemap.ee_initialize(service_account=service_account)