achavi icon indicating copy to clipboard operation
achavi copied to clipboard

Pixel-wide hotspots

Open Zverik opened this issue 11 years ago • 3 comments

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.

Zverik avatar Jul 18 '14 05:07 Zverik

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.

nrenner avatar Jul 18 '14 20:07 nrenner

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

Zverik avatar Jul 19 '14 15:07 Zverik

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.

nrenner avatar Jul 21 '14 19:07 nrenner