lonboard
lonboard copied to clipboard
Tooltip viewer can be too crowded
When you click on an object, maybe show a sidebar or a collapsible menu.
Overture is a good example. We might want a JSON viewer
In #636, we replaced the tooltip with a scrollable side panel. Currently, there is no visual indication that a feature can be clicked to open the side panel, which was not necessary when the tooltip was used.
@kylebarron you suggested documenting this behavior. Do you have any recommendations on the best approach? I still believe it is possible to change the mouse pointer on feature hover to indicate interactivity. We can do something using getCursor like in here, but it might be better to track as an enhancement in a separated ticket.
I think documenting it in the release notes and documentation website is fine and sufficient
The side panel is a nice addition to lonboard. However, I believe there is still a need for a tooltip, albeit with selectable contents as opposed to dumping it all in the side panel. I have included a video showing the behaviour I'm about to make the following comments on.
- I play with
_heightto show the effect of toggling expand/collapse cell output of the map; I'll note that with a height greater than the default cell output height, the toggle has to be "convinced" a little (like click three times before I can see the full map height), but that's not a big deal - I like the
auto_highlightfeature a lot;; when the side panel lets the user see enough of the image to notice the current panel is linked to the highlighted feature, all is fine; however - when the side panel covers the entire map, we have a problem; the 'x' becomes a kind of '<' because it is hidden by the bbox button in the top right
Playing with the notebook panel width (e.g. showing the lefthand side Jupyterlab panel) shows how the panel wraps content well. So I'm thinking : is there a way to restrict the side panel to a percentage of the map cell output so as to still be able to see the selected/highlighted feature ?
As to the tooltip functionality, I believe it would still be useful for quick identification of features, when one does not want the whole pedigree. show_tooltip set to True does not show a tooltip. I think if one were to define a tooltip object attached to the map (or layer ?) it should be selectable on the map like the PMTiles Viewer Popup/Show Attributes. I'll try to have a look but you guys are probably in a better position to do an eventual PR.
Thanx again for lonboard, really.
https://github.com/user-attachments/assets/4d0f1f27-de81-47a7-a109-18f1ea47c441
Even more intuitive IMO : tooltip has instruction "click feature for more details" which pops the side panel.
There are definitely some tooltip improvements we need to make. @vgeorge is out this week and hopefully we'll get some fixes in next week.
The hover tooltips seen in https://github.com/developmentseed/lonboard/blob/e655269/README.md#lonboard looked cool, but I suppose they were removed in #636. Came here confused when show_tooltip = True wouldn't do anything.
Is there a way to re-enable the old way?
Indeed, they were removed in https://github.com/developmentseed/lonboard/pull/636. I think replacing the tooltip entirely with the side panel was possibly not the right decision, because for datasets with few attribute columns, the tooltip might be more useful than a full side panel.
I'm open to restoring the tooltip under a flag.
show_tooltip = Truewouldn't do anything.
If that is True, when you click on a feature it will show a side panel with attribute information. If that is False, no "picking" will be done on the map on click.
+1 for both tooltip and side panel options
I merged https://github.com/developmentseed/lonboard/pull/736 to bring back the tooltip. There's now a separate show_tooltip parameter on Map defaulting to False and show_side_panel, defaulting to True.
I'd like to get a new release out soon with this change.