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

When no quests on screen, show pointer to closest quest at edge of screen. #2832

Closed
dbdean opened this issue May 2, 2021 · 2 comments
Closed

Comments

@dbdean
Copy link
Contributor

dbdean commented May 2, 2021

Use case

If I've completely mapped out the area visible on my screen, it would be great to see an indicator at the edge of the screen showing the direction of the next closest quest. This would allow me to easily drag the screen in that direction to see the closest quest I need to travel to to keep mapping.

Proposed Solution

Show an icon with a pointer at the edge of the screen in the direction of the closest quest. Only show once quests are loaded and if no visible quests are on the screen. Implement similar to the icon that shows the direction of your location when your location is not on screen.

@smichel17
Copy link
Member

Closest to your current location, or closest to the map center? How should it behave when there are two quests a similar distance away (eg, northeast and northwest, and you're on a road heading north) -- is it a problem if it flips between one and the other?

Note that there is a possible performance concern:

  1. If I recall correctly, quest locations are calculated and then passed to tangram-es, the map rendering library we use, but they are not saved after that; tangram handles storing them and deciding which are visible, for the most part.
  2. The location pin / off-screen indicator is custom StreetComplete code, not part of tangram.

So, the simplest implementation -- each time the position changes, find the nearest quest and display an off-screen pin for it -- would involve searching the db for quests every time the location updates, which might not be fast enough, especially on old phones. Nothing that can't be worked around, but it means the implementation isn't quite as simple as "just do the same thing for the nearest quest as we do for the location".

@westnordost
Copy link
Member

This is a duplicate of #871

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants