Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Enhancement for Polyline::onTap

Open
#51 0 comments 0 reactions 1 assignee View on GitHub

@LuisThein is already working on this.

Since Mar 27, 2022.

Assessment

This issue has not been assessed yet.

Description

enhancement

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

Dominant language
Dart
Stars
83
Forks
72
PR merge metrics
No merged PRs in 30d

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fluttercommunity/platform_maps_flutter

All issues in fluttercommunity/platform_maps_flutter

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.