Skip to content

Enhancement for Polyline::onTap #51

@kuzmycz

Description

@kuzmycz

Is your feature request related to a problem? Please describe.
I use polylines to circumscribe a region (defined by markers) and when a user click on a Polyline I want to add a marker where they tap and insert the marker into my marker list. Currently, when a user taps on the Polyline, I have no way of telling where they selected. This requires me to calculate the midpoint and drop the marker there. The user then has to drag the marker to the final destination which is annoying for the user.

Describe the solution you'd like
I would like the Polyline onTap method to pass the the Polyline selected and the position on the map they tapped

eg. line.onTap = process(Polyline polyline, LatLng position) => do stuff

Providing the Polyline (that was tapped) allows generic functions to be used (not required, but nice to have)
Providing the position allows an application to reason about where on the line the tap occurs. In may case, the position to drop the marker

Describe alternatives you've considered
Currently calculate the midpoint of the Polyline. This is annoying for the user as they have to reposition the marker

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions