Google Place API Flutter syncing with custom city database table

107 Views Asked by At

I am working on a taxi booking app where routes between cities are predefined in the database with pickup and drop city. Without google place API things are working fine. Now I want to make a dropdown in flutter where it can search any city in the country and if those pickup and drop cities are found in the database then display the route from DB otherwise it will just log an entry in the booking inquiry.

How to map a city data from google to a custom city table where I have cities' names?

1

There are 1 best solutions below

0
On

This is more of a choice where developers will use their ideas and implement this in their own way. This is though not a right platform to ask this kind of question. Yet I'll try to help in my own way.

In my opinion you don't need to map anything for this case. You can simply check for user input on dropdown and check with your stored cities. If no matches found, you keep the entry for inquiry and if a match is found, you can use Google's Direction api to find route and draw on map.