What I am trying to do is the following:
- I have an address XYZ
- I have a list of other Addresses
- I want to get out of the list, all the addresses within a certain distance of XYZ
Is it possible, if yes, which API would you recommend to do this? I would like to do this in a Java web-application that I am building using Spring.
I saw that with Google Places API, I would need to give the longitude and latitude of the place as well as the radius and a name of place I am looking for. Is this the common way to do this?
I can't do this with a list containing thousands of addresses since it would be too time consuming.
Would it be better to insert the longitude and latitude in the database at the time I am inserting an address (after verifying it with Google API and getting those information from there), then extracting the addresses within the proper radius directly in the SQL request?
I also found from this post: How to convert an address to a latitude/longitude?
That "use of the geocoder for any purpose other than obtaining locations that will be displayed using the Google Maps APIs is a violation of the Terms of Service."
So let's say that, if I build a website that will help people find "pizza places" near buy an address they input, then I display a list of these places on the website, it is illegal?