fysoul17 / google_maps_place_picker

Place picker on Google Maps for Flutter
MIT License
222 stars 356 forks source link

[Feature Request] Add Circles support #138

Closed eliabieri closed 2 years ago

eliabieri commented 2 years ago

Is your feature request related to a problem? Please describe. For our application we'd like the user to pick a circular area (center point and radius)

Describe the solution you'd like The user should be able to freely chose the radius, move the circular area by dragging the map and search for places to relocate the center of the circle.

Describe alternatives you've considered Alternatively, users could chose the radius outside of the place picker view and only see the radius. This would only require to expose the circles parameter of the GoogleMaps constructor.

Additional context Preferably, the resulting UI would look something like this image

martin-braun commented 2 years ago

This is way more specific and I don't think someone will implement it within a time frame that would be suitable for you. The package allows you to supply a widget builder for the pin, so it should be possible to provide a wrapper, but there is no way to set circles or provide a search bar builder.

Since you are not even selecting addresses, but only areas, you are definitely better off just cloning this repo and copying stuff and doing it on your own. Your case is very specific, but not impossible. You don't need the widget that pops up on selection in this package.

Use the GoogleMap component, set the circles property with Set<Circle>, update the circle when radius or camera changes. Copy the address pick logic from this package and build your own search bar header.

To make your request compatible with this repository someone would need to expose the shape properties and the camera dragged event of GoogleMap to the host widget and provide a search bar widget builder in a similar fashion like the other widget builders. It would still require you to code a lot of stuff to get the outcome above, though.

eliabieri commented 2 years ago

Thank you very much for your feedback!