Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix streaming basemaps when using saved project #142

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion planet_explorer/gui/pe_basemap_layer_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,9 @@ def change_source(self):
res = pattern.search(unquote(self.layer.source()))
passed_api_key = res.groups()[0] if res.groups() else None

if '&' in passed_api_key:
passed_api_key = passed_api_key.split('&')[0]

has_api_key = PlanetClient.getInstance().has_api_key()

# The label warning should only be shown if a logged-in user doesn't
Expand All @@ -378,7 +381,7 @@ def change_source(self):

api_key = (
PlanetClient.getInstance().api_key()
if not passed_api_key
if not passed_api_key or passed_api_key is ''
else passed_api_key
)

Expand Down
Loading