-
-
Notifications
You must be signed in to change notification settings - Fork 20
Add direction=-Quest
#813
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
base: modified
Are you sure you want to change the base?
Add direction=-Quest
#813
Conversation
* Add direction quest
|
I am tempted to ping @westnordost to see if this quest would be something for StreetComplete proper. The only downside I see is that this info does not have much use apart from (3D-)rendering. 🤔 |
westnordost
left a comment
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.
Wow, cool UI, and in compose, no less!
There is an open quest request for StreetComplete involving direction, though, for viewpoints: streetcomplete#776
Although, looking at the wiki article for tourism=viewpoint, it sounds like it would be better to (be able to) specify a range than a single direction (plus an "other answer" option to say it is 360 degrees/all directions).
The UI could be very similar to your arrow though. Instead of the arrow, a circular sector is shown. As to how to specify the width of the sector, two ideas:
- the further away from the center the drag gesture, the wider the sector. (Might be problematic if the circle is too small / too small to the screen border)
- "painting" it: min and max angle of finger during a single drag is used to determine the range.
Regarding the other elements, I'd tentatively agree that the information is not valuable/meaningful enough to include to StreetComplete:
- benches: seems to be just for 3D rendering
- billboards: I expect there won't be any surprises there - they are facing the oncoming cars, like traffic signs. I.e. it is clear from their location in which direction they are facing. (Also, I don't see any other use case than for 3D rendering)
- traffic signs: see billboards
- vending machines: 1. I think you could also include ATMs, 2. also wouldn't know a use case for this.
| ) | ||
| } | ||
| } | ||
| androidx.compose.foundation.Image( |
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.
y no import?
| angle: Float, | ||
| onAngleChange: (Int) -> Unit, |
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.
angle is float, but onAngleChange is int?
Also, it is a bit of a problem that angle can not be null. That means, that before even taping any direction, the quest form will report that the form is complete. IIRC this is not standard, the OK button should only appear after the user input something.
A suggestion: either don't display the arrow at all at the beginning or as a sort of hint (with high transparency).
(This widget also probably needs some sort of usage hint. Like e.g. the street side select has: Maybe you can launch an effect on first opening that shows some kind of touch/ripple effect on the widget?)
| var deg = Math.toDegrees(atan2(dx.toDouble(), dy.toDouble())).toFloat() | ||
| deg = normalizeDegrees(deg + mapRotation) | ||
| val snapped = (deg / 5f).roundToInt() * 5 | ||
| onAngleChange(((snapped % 360) + 360) % 360) |
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.
what's that? Do you want to make sure that the returned angle is positive? You could use normalizeDegrees
|
Furthermore, I've looked at taginfo to see for what things this is used. On the other hand, there might be an uproar among the pea-counters in OpenStreetMap, if the direction of solar panels is specified in degrees rather than cardinal direction, suggesting a very precise measurement, and it turns out the roof the solar panels are on is some degrees off from the roof itself. Well, 🤷, regardless, I guess all solar panels on the southern hemisphere will be somewhat oriented to the south. Although, of course, if the roof itself has no surface directly to the south, it could still be useful information. More importantly, it may be difficult to see from the ground, plus, this is information that could just as well and more easily be recorded from satellite imagery. |
We could ask before this GUI:
The range would than ask for too angles. |
|
I could also see this being useful for observation towers and mounted binoculars to indicate in which direction you can view stuff in. |
After the discussion in #549 , I have leveraged some newfangled AI tools to implement a
direction=-Quest in the way I find acceptable from a UI standpoint.So... yeah :D It's a quest that asks for the
direction=-Value for benches, vending machines, traffic signs and billboards. Are there other things that should be added to this filter?The rotation indicator always rotates with the map, so you can just orient the arrow to face where the thing is facing on your map without having to think about your map orientation.
Screenrecorder-2025-06-10-00-24-08-738.online-video-cutter.com.mp4