ReverseGeocodeRequestOptions Object


In order to reverse geocode a location you need to pass an object containing reverse geocode request options into the reverseGeocode method. The following is a list of properties that can be included in a reverse geocode request.

callbackfunction(result: PlaceResult, userData: any)A reference to a function to call when a successful result is returned from the geocode request. The callback function will receive a PlaceResult object as an argument.
errorCallbackfunction(result: ReverseGeocodeRequestOptions)A reference to a function to call when the request is returned with an error. The error callback function will receive an object containing the geocode request options used in the request.
includeCountryIso2booleanSpecifies to include the two-letter ISO country code. Default: false
includeEntityTypesstring[]An array of entity types selected from the following options.

  • Address
  • Neighborhood
  • PopulatedPlace
  • Postcode1
  • AdminDivision1
  • AdminDivision2
  • CountryRegion

These entity types are ordered from the most specific entity to the least specific entity. When entities of more than one entity type are found, only the most specific entity is returned. For example, if you specify Address and AdminDistrict1 as entity types and entities were found for both types, only the Address entity information is returned in the response. One exception to this rule is when both PopulatedPlace and Neighborhood entity types are specified and information is found for both. In this case, the information for both entity types is returned. Also, more than one Neighborhood may be returned because the area covered by two different neighborhoods can overlap.
includeNeighborhoodbooleanA boolean that specifies that neighborhood information should be included when available.

Note: This feature isn’t available in all locations.
locationLocationRequired. The location to use to match to geographic entities and addresses.
timeoutnumberA number indicating how long to wait, in seconds, for the geocode request to return. Default: 5 seconds
userDataanyAn object containing any data that needs to be passed to the callback when the request is completed.