fluttercommunity / fluttercommunity/platform_maps_flutter

Enhancement for Polyline::onTap

Open
#51 0 comments 0 reactions 1 assignee Claimed by @LuisThein View on GitHub
enhancement
Dominant language
Dart
Stars
83
Forks
72
PR merge metrics
No merged PRs in 30d

Description

**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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.