Waypoint class
Encapsulates a waypoint. Waypoints mark both the beginning and end of a route, and include intermediate stops along the route.
- Inheritance
-
- Object
- GeneratedMessage
- Waypoint
Constructors
- Waypoint.new({Location? location, String? placeId, bool? via, bool? vehicleStopover, bool? sideOfRoad, String? address})
-
factory
-
Waypoint.fromBuffer(List<
int> i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) -
factory
- Waypoint.fromJson(String i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
-
factory
Properties
- address ↔ String
-
Human readable address or a plus code.
See https://plus.codes for details.
getter/setter pair
- eventPlugin → EventPlugin?
-
Subclasses can override this getter to be notified of changes
to protobuf fields.
no setterinherited
- hashCode → int
-
Calculates a hash code based on the contents of the protobuf.
no setterinherited
- info_ → BuilderInfo
-
no setteroverride
- isFrozen → bool
-
Returns
true
if this message is marked read-only. Otherwisefalse
.no setterinherited - location ↔ Location
-
A point specified using geographic coordinates, including an optional
heading.
getter/setter pair
- placeId ↔ String
-
The POI Place ID associated with the waypoint.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sideOfRoad ↔ bool
-
Indicates that the location of this waypoint is meant to have a preference
for the vehicle to stop at a particular side of road. When you set this
value, the route will pass through the location so that the vehicle can
stop at the side of road that the location is biased towards from the
center of the road. This option works only for
DRIVE
andTWO_WHEELER
google.maps.routing.v2.RouteTravelMode
.getter/setter pair - unknownFields → UnknownFieldSet
-
no setterinherited
- vehicleStopover ↔ bool
-
Indicates that the waypoint is meant for vehicles to stop at, where the
intention is to either pickup or drop-off. When you set this value, the
calculated route won't include non-
via
waypoints on roads that are unsuitable for pickup and drop-off. This option works only forDRIVE
andTWO_WHEELER
travel modes, and when thelocation_type
isgoogle.maps.routing.v2.Location
.getter/setter pair - via ↔ bool
-
Marks this waypoint as a milestone rather a stopping point. For
each non-via waypoint in the request, the response appends an entry to the
google.maps.routing.v2.Route.legs
array to provide the details for stopovers on that leg of the trip. Set this value to true when you want the route to pass through this waypoint without stopping over. Via waypoints don't cause an entry to be added to thelegs
array, but they do route the journey through the waypoint. You can only set this value on waypoints that are intermediates. The request fails if you set this field on terminal waypoints. IfComputeRoutesRequest.optimize_waypoint_order
is set to true then this field cannot be set to true; otherwise, the request fails.getter/setter pair
Methods
-
addExtension(
Extension extension, Object? value) → void -
Adds an extension field value to a repeated field.
inherited
-
check(
) → void -
inherited
-
clear(
) → void -
Clears all data that was set in this message.
inherited
-
clearAddress(
) → void -
clearExtension(
Extension extension) → void -
Clears an extension field and also removes the extension.
inherited
-
clearField(
int tagNumber) → void -
Clears the contents of a given field.
inherited
-
clearLocation(
) → void -
clearLocationType(
) → void -
clearPlaceId(
) → void -
clearSideOfRoad(
) → void -
clearVehicleStopover(
) → void -
clearVia(
) → void -
clone(
) → Waypoint -
Creates a deep copy of the fields in this message.
(The generated code uses mergeFromMessage.)
override
-
copyWith(
void updates(Waypoint)) → Waypoint -
Apply
updates
to a copy of this message.override -
createEmptyInstance(
) → Waypoint -
Creates an empty instance of the same message type as this.
override
-
createMapField<
K, V> (int tagNumber, MapFieldInfo< K, V> fi) → Map<K, V> -
Creates a Map representing a map field.
inherited
-
createRepeatedField<
T> (int tagNumber, FieldInfo< T> fi) → List<T> -
Creates List implementing a mutable repeated field.
inherited
-
ensureLocation(
) → Location -
extensionsAreInitialized(
) → bool -
inherited
-
freeze(
) → GeneratedMessage -
Make this message read-only.
inherited
-
getDefaultForField(
int tagNumber) → dynamic -
Returns the default value for the given field.
inherited
-
getExtension(
Extension extension) → dynamic -
Returns the value of
extension
.inherited -
getField(
int tagNumber) → dynamic -
Returns the value of the field associated with
tagNumber
, or the default value if it is not set.inherited -
getFieldOrNull(
int tagNumber) → dynamic -
Returns the value of a field, ignoring any defaults.
inherited
-
getTagNumber(
String fieldName) → int? -
inherited
-
hasAddress(
) → bool -
hasExtension(
Extension extension) → bool -
Returns
true
if a value ofextension
is present.inherited -
hasField(
int tagNumber) → bool -
Whether this message has a field associated with
tagNumber
.inherited -
hasLocation(
) → bool -
hasPlaceId(
) → bool -
hasRequiredFields(
) → bool -
Whether the message has required fields.
inherited
-
hasSideOfRoad(
) → bool -
hasVehicleStopover(
) → bool -
hasVia(
) → bool -
isInitialized(
) → bool -
Whether all required fields in the message and embedded messages are set.
inherited
-
mergeFromBuffer(
List< int> input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges serialized protocol buffer data into this message.
inherited
-
mergeFromCodedBufferReader(
CodedBufferReader input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
inherited
-
mergeFromJson(
String data, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges field values from
data
, a JSON object, encoded as described byGeneratedMessage.writeToJson
.inherited -
mergeFromJsonMap(
Map< String, dynamic> json, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges field values from a JSON object represented as a Dart map.
inherited
-
mergeFromMessage(
GeneratedMessage other) → void -
Merges the contents of the
other
into this message.inherited -
mergeFromProto3Json(
Object? json, {TypeRegistry typeRegistry = const TypeRegistry.empty(), bool ignoreUnknownFields = false, bool supportNamesWithUnderscores = true, bool permissiveEnums = false}) → void -
Merges field values from
json
, a JSON object using proto3 encoding.inherited -
mergeUnknownFields(
UnknownFieldSet unknownFieldSet) → void -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setExtension(
Extension extension, Object value) → void -
Sets the value of a non-repeated extension field to
value
.inherited -
setField(
int tagNumber, Object value) → void -
Sets the value of a field by its
tagNumber
.inherited -
toBuilder(
) → GeneratedMessage -
Creates a writable, shallow copy of this message.
inherited
-
toDebugString(
) → String -
Returns a String representation of this message.
inherited
-
toProto3Json(
{TypeRegistry typeRegistry = const TypeRegistry.empty()}) → Object? -
Returns an Object representing Proto3 JSON serialization of
this
.inherited -
toString(
) → String -
Returns a String representation of this message.
inherited
-
whichLocationType(
) → Waypoint_LocationType -
writeToBuffer(
) → Uint8List -
inherited
-
writeToCodedBufferWriter(
CodedBufferWriter output) → void -
inherited
-
writeToJson(
) → String -
Returns a JSON string that encodes this message.
inherited
-
writeToJsonMap(
) → Map< String, dynamic> -
Returns the JSON encoding of this message as a Dart Map.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
) → Waypoint -
createRepeated(
) → PbList< Waypoint> -
getDefault(
) → Waypoint