Find closest addresses in Google Maps [closed]

3

I have more than 2,000 records in a database with address and zip code, and I want to locate the closest locations in my zip code using the Google Maps API.

Example of what I need .

But in my case I want to locate some of the records in the database closest to the typed CEP.

    
asked by anonymous 03.11.2014 / 18:16

1 answer

3

One solution is to query the API with each zip code in the bank ( destinations ), with the zip code informed by the client (origins ), save to a list and sort by lower value of distance.

To limit the query, you can use the city as a parameter, thus searching only for the ZIP code of the city informed by the client.

Example: link

I also believe this tutorial can help you.

    
17.02.2016 / 16:52