We would like to implement a new feature in our app where users can see some stores sorted by proximity. Currently in our database we just have fields of string (country, state, city, address). In this situation which would be the best way to implement this feature? Create a script to discover the geolocation of every row? Or is there something better/simpler?
CodePudding user response:
You need to convert country/state/city/address to latitude & longitude. Having script to convert all your data to new format is first step you should done. When you have lat/lng points then you can do some math to find stores by proximity.