Class 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
    • Method Detail

      • newRequest

        public static GeocodingApiRequest newRequest​(GeoApiContext context)
        Creates a new Geocoding API request.
        Parameters:
        context - The GeoApiContext 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 an address.
        Parameters:
        context - The GeoApiContext 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 a location.
        Parameters:
        context - The GeoApiContext to make requests through.
        location - The location to reverse geocode.
        Returns:
        Returns the request, ready to run.