Package ai.nextbillion.maps
Class GeocodingApi
java.lang.Object
ai.nextbillion.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 classGeocodingApi.Response -
Method Summary
Modifier and Type Method Description static GeocodingApiRequestgeocode(GeoApiContext context, java.lang.String address)Requests the latitude and longitude of anaddress.static GeocodingApiRequestnewRequest(GeoApiContext context)Creates a new Geocoding API request.static GeocodingApiRequestreverseGeocode(GeoApiContext context, LatLng location)Requests the street address of alocation.
-
Method Details
-
newRequest
Creates a new Geocoding API request.- Parameters:
context- TheGeoApiContextto make requests through.- Returns:
- Returns the request, ready to run.
-
geocode
Requests the latitude and longitude of anaddress.- Parameters:
context- TheGeoApiContextto make requests through.address- The address to geocode.- Returns:
- Returns the request, ready to run.
-
reverseGeocode
Requests the street address of alocation.- Parameters:
context- TheGeoApiContextto make requests through.location- The location to reverse geocode.- Returns:
- Returns the request, ready to run.
-