-
Notifications
You must be signed in to change notification settings - Fork 28
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 attribution #561
Fix attribution #561
Conversation
custom_attribution = traitlets.Union( | ||
[ | ||
traitlets.Unicode(allow_none=True), | ||
traitlets.List(traitlets.Unicode(allow_none=False)), | ||
] | ||
).tag(sync=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the attribution need to support hyperlinking too? I.e. do we need to define not just text but also the target URL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kylebarron the MapLibre attribution control renders html links if the attribution text contains an element. They are not appearing now because the Map container has z-index: -1
, making the DeckGL canvas to be placed in front of the map controllers, blocking mouse events on it. In the recording below I disabled the z-index
, but that caused the data layer to disappear. The z-index is not defined in Lonboard code, I would suggest we address this issue in separate because resolving the z-index conflict might require a more complex solution that ensures both the DeckGL canvas and MapLibre controllers are correctly rendered and interactive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also quite tied to the decision here: #437, of whether we should fully tie ourselves to Maplibre or not, or whether we should at least provide an option for ourselves in the future to have deck-only rendering without Maplibre |
@kylebarron If you are concerned about having the parameter |
```py | ||
m = Map( | ||
layers, | ||
custom_attribution="Development Seed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we maybe mention that this custom_attribution
string can be HTML? Or should we wait on that until the link is actually clickable with fixed z-index?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should mention it once it is supported properly. Let's keep tracking it on #561.
This adds a
custom_attribution
property to theMap
class and fix Maplibre CSS by adding an import. Contributes to:To test, add the
custom_attribution
property to a Map instance as demonstrated in the API docs examples.@kylebarron this is ready for review.