Package com.google.maps
Class GeocodingApi
- java.lang.Object
-
- com.google.maps.GeocodingApi
-
public class GeocodingApi extends java.lang.Object
Geocoding is the process of converting addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates (like latitude 37.423021 and longitude -122.083739), which you can use to place markers or position the map. Reverse geocoding is the process of converting geographic coordinates into a human-readable address.- See Also:
- Geocoding documentation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GeocodingApi.Response
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GeocodingApiRequest
geocode(GeoApiContext context, java.lang.String address)
Requests the latitude and longitude of anaddress
.static GeocodingApiRequest
newRequest(GeoApiContext context)
Creates a new Geocoding API request.static GeocodingApiRequest
reverseGeocode(GeoApiContext context, LatLng location)
Requests the street address of alocation
.
-
-
-
Method Detail
-
newRequest
public static GeocodingApiRequest newRequest(GeoApiContext context)
Creates a new Geocoding API request.- Parameters:
context
- TheGeoApiContext
to make requests through.- Returns:
- Returns the request, ready to run.
-
geocode
public static GeocodingApiRequest geocode(GeoApiContext context, java.lang.String address)
Requests the latitude and longitude of anaddress
.- Parameters:
context
- TheGeoApiContext
to make requests through.address
- The address to geocode.- Returns:
- Returns the request, ready to run.
-
reverseGeocode
public static GeocodingApiRequest reverseGeocode(GeoApiContext context, LatLng location)
Requests the street address of alocation
.- Parameters:
context
- TheGeoApiContext
to make requests through.location
- The location to reverse geocode.- Returns:
- Returns the request, ready to run.
-
-