handlePolylineTouch

Checks if a touch at screen coordinates hits a clickable polyline.

Uses point-to-line-segment distance calculation with a touch tolerance.

Return

The clicked polyline or null if none was hit

Parameters

x

The x coordinate in screen pixels

y

The y coordinate in screen pixels