Skip to content

Commit

Permalink
Merge pull request #142 from planetlabs/fix_basemaps_streaming_v2
Browse files Browse the repository at this point in the history
Fix streaming basemaps when using saved project
  • Loading branch information
john-dupuy authored Apr 12, 2024
2 parents 21143d1 + e0ff782 commit daa351a
Showing 1 changed file with 4 additions and 1 deletion.
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

0 comments on commit daa351a

Please sign in to comment.