Search code examples
google-maps-api-3latitude-longitudestreet-address

Google maps api v3 get lat long from file with addresses in java code


I am trying to make an application which draws a heatmap. I have a file with home addresses which I am going to put on the map. Every address is a new line in this file. I know how to create a heatmap layer when have coordinates.
What is the best way to get coordinates for these addresses?
I know there are couple ways of doing that, but the one that I am looking for is the way to do it on a server. I know that I have to send a request to the server. Can you please provide an example code in Java which gets a lat long coordinates for it.


Solution

  • You could use this library:

    http://code.google.com/p/geocoder-java/

    It has documented examples as well.