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

Sidewalk overlay: cannot select road if adjacent sidewalks are too close #5849

Closed
pkoby opened this issue Aug 28, 2024 · 6 comments
Closed
Labels

Comments

@pkoby
Copy link

pkoby commented Aug 28, 2024

In the sidewalk overlay, at lower zoom levels or where sidewalks are close to the street centerline, it seems like it's impossible to select the road. It looks like the sidewalks are unselectable, but buffered and layered above the streets.

I wanted to wait until this next version came out to make sure I didn't overwhelm with MapLibre-related issues.

How to Reproduce

Try to tap on a road with adjacent sidewalks. If you do select it, zoom out and try again.

Versions affected

v59.0-alpha2

@pkoby pkoby added the bug label Aug 28, 2024
@westnordost westnordost removed the bug label Aug 28, 2024
@westnordost
Copy link
Member

I don't quite understand. Why don't you zoom in more, then?

@pkoby
Copy link
Author

pkoby commented Aug 28, 2024

If there are no separately mapped sidewalks, it's no problem to select a road at any zoom level. Separately mapped sidewalks are useful reference lines, but you can't select them in the sidewalk overlay. As far as I can tell, the separate sidewalks are blocking me from selecting a road.

Yes, I can zoom in to select it, but in some instances I'm zooming in pretty far before it's not blocked by the sidewalks.

@pkoby
Copy link
Author

pkoby commented Aug 28, 2024

As an example, at this level of zoom I can only select the road with a precise tap right on the center of the line, not buffered like I expect. The little service road without sidewalks is much easier to select.

2024-08-28 17 58 49

@mnalis
Copy link
Member

mnalis commented Aug 28, 2024

I can see that hitting the road in v59.0-alpha2 is harder than it was in Tangram-ES versions, but I do not see that roads without adjacent sidewalk are somehow easier to hit. They seem equally hard to me. Video:

small_Screen_Recording_20240829_001201_StreetComplete.mp4

That is especially noticeable the more one zooms in. When you zoom in so that road takes up half a screen width, you can be clicking on 95% of the displayed road without it registering (unless you hit it on dead center).

@westnordost
Copy link
Member

Well, all highlighted overlay lines have a tap buffer, otherwise they would hardly be tappable at all (the area would be just too small). Now, IIRC the separate lines should take precedence because otherwise they would sometimes not tappable at all when they are very close to the road line, as the buffer of the road line would overlap the actual separately mapped sidewalk/cyclway.

I think nothing can be changed in regards to that if a highlighted way does not respond to a tap event, the tap should instead go to the next element.

But from your video, I see that something definitely seems to be wrong regarding the calculation of the buffer. Does the buffer scale with the zoom? It shouldn't, it should always be just a few pixels to left and right of the way so that the tap area is about as big as a map button.

@westnordost
Copy link
Member

I checked. The buffer does not scale with the zoom. But, intuitively, the tap does only register on the center of the line plus the fixed "fat finger" radius of 24px around the tapped point. So, intuitively zooming in does not help. I created a feature request at MapLibre: maplibre/maplibre-native#2781

Furthermore, I worked around the issue that on lower zooms a feature is sometimes selected even if one exactly tapped on the center of another feature. This happens when two lines are close by and the "fat finger" radius is larger than the distance between these two features.

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

3 participants