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

Pixel-wide hotspots #2

Open
Zverik opened this issue Jul 18, 2014 · 3 comments
Open

Pixel-wide hotspots #2

Zverik opened this issue Jul 18, 2014 · 3 comments

Comments

@Zverik
Copy link

Zverik commented Jul 18, 2014

It is very hard to point mouse cursor at a feature, because all lines are just a pixel wide. Could you please increase "hot" area to 3 pixels? If possible, without increasing visible line widths.

@nrenner
Copy link
Owner

nrenner commented Jul 18, 2014

I agree this is an issue, but I don't know an easy solution. Hit-testing is done by SVG and AFAIK there is no way to specify a pixel tolerance. And I do like those thin lines. From zoom 16 on lines are 2 pixels wide.

When switching to Leaflet, using Canvas and it's custom hit detection might be a solution, but can't tell when that will be.

@Zverik
Copy link
Author

Zverik commented Jul 19, 2014

Can you draw an invisible wide contour on top of a visible line / polygon and use it for collision testing?

@nrenner
Copy link
Owner

nrenner commented Jul 21, 2014

That might be a better solution, but would need some thought on how to implement to avoid too much impact on memory and performance. I would also want to do this with Leaflet. I need to see how my other stuff goes and probably prioritize switching to Leaflet then.

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

No branches or pull requests

2 participants