blackmann / locationpicker

Location picker for Flutter.
Other
167 stars 159 forks source link

How to search for predefined locations in the Search Bar #49

Open leoshrey opened 3 years ago

leoshrey commented 3 years ago

I want user to select from predefined locations by fetching from the location list provided by the server side/ api. So that user can search for a location in the field which is available in the list. Provided that the already selected location can't be selected again. How can I achieve this with this library?

leoshrey commented 3 years ago

@blackmann, @jogboms, @vishal-android-freak, @daverupp Anyone ?

vishal-android-freak commented 3 years ago

I am afraid, you will have to write a custom implementation with Google maps flutter plugin. This can be easily achieved. You can return the exact lat long of the place searched by the user, in your API response and add a pin to the map on the returned location coordinates.

leoshrey commented 3 years ago

So, I can use any api for fetching locations to show them in the search bar ? And will any other component (in this plugin) get affected by doing so ? And what do you mean by returning lat long here? Actually I want user to be able to select only those locations which are not already selected by any other user. Will I be able to use this plugin itself for achieving the desired feature ?