Orcasa-Platform / orcasa

A Horizon Europe project to restore soil earth
https://orcasa-client.vercel.app
MIT License
2 stars 0 forks source link

[Geospatial data] Display attributions for the layers on the map #286

Closed clementprdhomme closed 6 months ago

clementprdhomme commented 6 months ago

This PR displays the sources of the active layers as attributions on the map.

Acceptance criteria

Tracking

ORC-615

vercel[bot] commented 6 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
orcasa-client ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2024 1:04pm
Bluesmile82 commented 6 months ago
image

This is an edge case but there is a point in which you can't see the Mapbox part anymore. We should allow the user to see it or have a tooltip.

clementprdhomme commented 6 months ago

@Bluesmile82 I had trouble to find a solution to fit the attributions on smaller screens. The main problem is that I don't control the attributions related to the basemap. I can only pass HTML for the custom attributions.

I thought that we could alternatively render our own attributions component instead of using the one from React Map GL/Mapbox but in that case I don't know how to receive the basemap's attributions programmatically.

Do you have any suggestion for me?

Bluesmile82 commented 6 months ago

I think one option would be to use the current static attribution that they have. Maybe it will change in the future but probably won't be a big change.

Another one is remove the line-clamp. On mobile it wont be a problem as we don't have the sidebar and if its too big it automatically shrinks to the compact version (info button). And on desktop it will be max two lines so maybe we have to move the legend a bit up