GeocodedWaypoint class
Details about the geocoding of every waypoint, as well as origin and destination, can be found in the (JSON) geocoded_waypoints array. These can be used to infer why the service would return unexpected or no routes.
Elements in the geocoded_waypoints array correspond, by their zero-based position, to the origin, the waypoints in the order they are specified, and the destination. Each element includes the following details about the geocoding operation for the corresponding waypoint:
geocoderStatus indicates the status code resulting from the geocoding operation. This field may contain the following values.
- "OK" indicates that no errors occurred; the address was successfully parsed and at least one geocode was returned.
- "ZERO_RESULTS" indicates that the geocode was successful but returned no results. This may occur if the geocoder was passed a non-existent address.
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 alternative address. Suggestions triggered in this way will also be marked as a partial match.
placeId is a unique identifier that can be used with other Google APIs. For example, you can use the place_id from a Google Place Autocomplete response to calculate directions to a local business. See the Place ID overview.
types indicates the address type of the geocoding result used for calculating directions. The following types are returned:
street_address
indicates a precise street address.route
indicates a named route (such as "US 101").intersection
indicates a major intersection, usually of two major roads.political
indicates a political entity. Usually, this type indicates a polygon of some civil administration.country
indicates the national political entity, and is typically the highest order type returned by the Geocoder.administrative_area_level_1
indicates a first-order civil entity below the country level. Within the United States, these administrative levels are states. Not all nations exhibit these administrative levels. In most cases, administrative_area_level_1 short names will closely match ISO 3166-2 subdivisions and other widely circulated lists; however this is not guaranteed as our geocoding results are based on a variety of signals and location data.administrative_area_level_2
indicates a second-order civil entity below the country level. Within the United States, these administrative levels are counties. Not all nations exhibit these administrative levels.administrative_area_level_3
indicates a third-order civil entity below the country level. This type indicates a minor civil division. Not all nations exhibit these administrative levels.administrative_area_level_4
indicates a fourth-order civil entity below the country level. This type indicates a minor civil division. Not all nations exhibit these administrative levels.administrative_area_level_5
indicates a fifth-order civil entity below the country level. This type indicates a minor civil division. Not all nations exhibit these administrative levels.colloquial_area
indicates a commonly-used alternative name for the entity.locality
indicates an incorporated city or town political entity.sublocality
indicates a first-order civil entity below a locality. For some locations may receive one of the additional types: sublocality_level_1 to sublocality_level_5. Each sublocality level is a civil entity. Larger numbers indicate a smaller geographic area.neighborhood
indicates a named neighborhoodpremise
indicates a named location, usually a building or collection of buildings with a common namesubpremise
indicates a first-order entity below a named location, usually a singular building within a collection of buildings with a common namepostal_code
indicates a postal code as used to address postal mail within the country.natural_feature
indicates a prominent natural feature.airport
indicates an airport.park
indicates a named park.point_of_interest
indicates a named point of interest. Typically, these "POI"s are prominent local entities that don't easily fit in another category, such as "Empire State Building" or "Eiffel Tower".
An empty list of types indicates there are no known types for the particular address component, for example, Lieu-dit in France.
Constructors
-
GeocodedWaypoint({String? geocoderStatus, bool? partialMatch, String? placeId, List<
String?> ? types}) -
const
-
GeocodedWaypoint.fromMap(Map<
String, dynamic> map) -
factory
Properties
- geocoderStatus → String?
-
Indicates the status code resulting from the geocoding
operation. This field may contain the following values.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- partialMatch → bool?
-
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.
final
- placeId → String?
-
Is a unique identifier that can be used with other
Google APIs. For example, you can use the place_id from a
Google Place Autocomplete response
to calculate directions to a local business. See the
Place ID overview.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
types
→ List<
String?> ? -
Indicates the address type of the geocoding result
used for calculating directions. The following types are
returned:
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited