Persist a Google maps place in a database and search for it via Google autocomplete API

Viewed 36

In our application user can persist Offer with a Place where that Offer will take place in a, ie. swimming pool. A persist flow works in a way that user look for a Place via Google Map/ Autocomplete API and we store a Place data (country, city, placeId ect) in our database. Next on a landing page there is a SearchBox in which you can provide different fields by which Offers needs to be found, ie. country, city or street.

So if we store a record in database with city called London and user will type London he will get Offers in London. BUT we also have translation in our application. So there could be a case that user save an Offer with city called Londyn and another user will search for offers by city called London which in fact are the same cities but in different language. Application persisted city as "Londyn" so search bar will not find any city with London.

We thought of translating cities ect in a fly but it can be a situation when we translate wrongly a city name in compare how Google does.

And looking for a place by place id in a background is not a good idea because it will not show places in a city but only in a specific place - which is also important for us.

Are there any other ways how to solve this issue?

0 Answers
Related