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

[core] Add colorbar/legend support #2041

Merged
merged 8 commits into from
Aug 8, 2024
Merged

Conversation

naschmitz
Copy link
Collaborator

@naschmitz naschmitz commented Jun 12, 2024

Changes:

  • Added private _add_legend and _add_colorbar APIs in core.
    • I'm not comfortable exposing a new public API in core until it has been thoroughly reviewed.
  • Fixed legend support in geemap non-core.
    • Colors weren't being passed to the constructor properly.
  • Simplified the legend/colorbar creation logic (string tokenization).

Design decisions:

  • Reversible decision: We don't keep track of "unowned" legends or colorbars in core.
    • Unowned here meaning it's not attached to any particular layer.
    • Using public core APIs, it's not possible to create an unowned map.

Testing:

  • Tested programmatic and manual legend and colorbar creation on both core and non-core.

@naschmitz naschmitz requested a review from giswqs June 12, 2024 19:05
@naschmitz naschmitz changed the title Add colorbar/legend support to core. [core] Add colorbar/legend support Jun 14, 2024
geemap/map_widgets.py Outdated Show resolved Hide resolved
@giswqs giswqs merged commit de97158 into gee-community:master Aug 8, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants