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

[Feat] grass.jupyter.InteractiveMap needs a legend #5468

Open
petrasovaa opened this issue Mar 28, 2025 · 4 comments
Open

[Feat] grass.jupyter.InteractiveMap needs a legend #5468

petrasovaa opened this issue Mar 28, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@petrasovaa
Copy link
Contributor

Is your feature request related to a problem? Please describe.
grass.jupyter.InteractiveMap needs a raster legend, there is no way to display it.

Describe the solution you'd like
One way would be to use d.legend and display that, but I think it will be nicer to get the color values with r.colors.out and use some html/javascript magic to create a legend.

Describe alternatives you've considered
Render d.legend into a file and display that on top of the map.

@petrasovaa petrasovaa added the enhancement New feature or request label Mar 28, 2025
@ayushsharma1657940

This comment has been minimized.

@wenzeslaus

This comment has been minimized.

@Aterg264
Copy link
Contributor

Aterg264 commented Apr 1, 2025

As an initial solution, I propose rendering d.legend to display the legend first. This will provide an immediate way to visualize raster legends within Jupyter Notebook.
Once that works, I can explore a more dynamic and interactive approach using r.colors.out combined with HTML and JavaScript to create a fully integrated legend. This should enhance usability and allow for better customization.
Would this approach work for you?

@petrasovaa
Copy link
Contributor Author

As an initial solution, I propose rendering d.legend to display the legend first. This will provide an immediate way to visualize raster legends within Jupyter Notebook. Once that works, I can explore a more dynamic and interactive approach using r.colors.out combined with HTML and JavaScript to create a fully integrated legend. This should enhance usability and allow for better customization. Would this approach work for you?

Well, that's what the issue is already describing, so yes, that works, although I would consider going with the second approach right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants