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

[MapModel] Add "tooltip" concept #303

Open
mbeckem opened this issue Apr 11, 2024 · 0 comments
Open

[MapModel] Add "tooltip" concept #303

mbeckem opened this issue Apr 11, 2024 · 0 comments
Labels

Comments

@mbeckem
Copy link
Contributor

mbeckem commented Apr 11, 2024

A tooltip on the map follows the cursor, may have an icon, and indicates what the user can do with the currently active interaction (e.g. click to select, double click to finish drawing, ...). This is repeated in mulitple packages (based on OpenLayers overlays).

Drawbacks of the current implementation:

  • No enforcement that there can be only one tooltip at a time
  • Code duplication
  • Developer needs to work with raw html nodes / string contents (error prone)
  • Developer cannot use react features inside the tooltip

Idea:

  • Implement a common tooltip / overlay API in the map model that makes it easy to create "widgets" at certain map coordinates (that may also follow the mouse). Ideally: support react here (via createPortal)
  • Implement an interaction API that enforces mutually exclusive cursor interactions (-> only one tooltip)
  • In the future, the tooltip / overlay API could also be used to implement popups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant