Class GeocodingResult

  • All Implemented Interfaces:
    java.io.Serializable

    public class GeocodingResult
    extends java.lang.Object
    implements java.io.Serializable
    A result from a Geocoding API call.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      AddressComponent[] addressComponents
      The separate address components in this result.
      java.lang.String formattedAddress
      The human-readable address of this location.
      Geometry geometry
      Location information for this result.
      boolean partialMatch
      Indicates that the geocoder did not return an exact match for the original request, though it was able to match part of the requested address.
      java.lang.String placeId
      A unique identifier for this place.
      PlusCode plusCode
      The Plus Code identifier for this place.
      java.lang.String[] postcodeLocalities
      All the localities contained in a postal code.
      AddressType[] types
      The types of the returned result.
    • Constructor Summary

      Constructors 
      Constructor Description
      GeocodingResult()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • addressComponents

        public AddressComponent[] addressComponents
        The separate address components in this result.
      • formattedAddress

        public java.lang.String formattedAddress
        The human-readable address of this location.

        Often this address is equivalent to the "postal address," which sometimes differs from country to country. (Note that some countries, such as the United Kingdom, do not allow distribution of true postal addresses due to licensing restrictions.) This address is generally composed of one or more address components. For example, the address "111 8th Avenue, New York, NY" contains separate address components for "111" (the street number, "8th Avenue" (the route), "New York" (the city) and "NY" (the US state). These address components contain additional information.

      • postcodeLocalities

        public java.lang.String[] postcodeLocalities
        All the localities contained in a postal code. This is only present when the result is a postal code that contains multiple localities.
      • geometry

        public Geometry geometry
        Location information for this result.
      • types

        public AddressType[] types
        The types of the returned result. This array contains a set of zero or more tags identifying the type of feature returned in the result. For example, a geocode of "Chicago" returns "locality" which indicates that "Chicago" is a city, and also returns "political" which indicates it is a political entity.
      • partialMatch

        public boolean partialMatch
        Indicates that the geocoder did not return an exact match for the original request, though it was able to match part of the requested address. You may wish to examine the original request for misspellings and/or an incomplete address.

        Partial matches most often occur for street addresses that do not exist within the locality you pass in the request. Partial matches may also be returned when a request matches two or more locations in the same locality. For example, "21 Henr St, Bristol, UK" will return a partial match for both Henry Street and Henrietta Street. Note that if a request includes a misspelled address component, the geocoding service may suggest an alternate address. Suggestions triggered in this way will not be marked as a partial match.

      • placeId

        public java.lang.String placeId
        A unique identifier for this place.
      • plusCode

        public PlusCode plusCode
        The Plus Code identifier for this place.
    • Constructor Detail

      • GeocodingResult

        public GeocodingResult()
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object