Java library for geocoding using the Google Maps API
NOTICE: It is a violation of the terms of the Google Maps API to geocode for purposes other than to display a locaton on a map.
Get the latest JAR at http://mvnrepository.com/artifact/org.json/json
-
Include the GeoParser class in your project
-
Download the JSON in Java dependency. Add downloaded JAR to project library
-
Create an instance of GeoParser with your Google Geocoding API key
GeoParser myGeoParser = new GeoParser("MYAPIKEY_124123102320A230ds");
- Get the latitude and longitude for a given address
myGeoParser.getLatitude("19 Brick Hill Road, Denmark");
myGeoParser.getLongitude("19 Brick Hill Road, Denmark");