GoogleNavigation Framework Reference
GMSRouteLeg
@interface GMSRouteLeg : NSObject
An immutable class which represents a single leg of a journey, either from the device’s current
position to the first destination, or from one destination to a subsequent destination.
-
The destination waypoint associated with this leg of the route.
-
The final coordinate in this leg. Note that this will in general not be the same location as the
destination waypoint, unless the waypoint is positioned directly on a road.
Declaration
Swift
var destinationCoordinate: CLLocationCoordinate2D { get }
Objective-C
@property (nonatomic, readonly) CLLocationCoordinate2D destinationCoordinate;
-
The path containing the coordinates which make up this route leg.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) GMSPath *path;
-
Declaration
Objective-C
- (null_unspecified instancetype)init NS_UNAVAILABLE;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-15 UTC.
[null,null,["Last updated 2024-11-15 UTC."],[[["`GMSRouteLeg` represents a single leg of a journey, from the current location to the first destination, or between destinations."],["Each leg has a destination waypoint, a final coordinate (which may differ from the waypoint), and a path of coordinates."],["The `path` property provides access to the coordinates that make up the route leg."],["Although a destination waypoint is associated with the leg, the final coordinate might not be the same if the waypoint isn't directly on a road."],["Attempting to initialize `GMSRouteLeg` directly using `init` is not allowed."]]],["GMSRouteLeg is an immutable class representing a single journey leg. It provides access to the `destinationWaypoint`, which is the waypoint associated with this leg. The `destinationCoordinate` property offers the final coordinate of the leg. It contains a `path`, a collection of coordinates that make up the route leg. The `init` method is unavailable, indicating that the class instances are not meant to be manually initialized.\n"]]