# GoogleNavigation Framework Reference

# GMSNavigationWaypoint

    @interface GMSNavigationWaypoint : NSObject <NSCopying, NSMutableCopying>

An immutable waypoint class, used to specify navigation destinations. It may be initialized from
a `CLLocationCoordinate2D` or a Google Place ID.
- `


  ### [title](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint#/c:objc(cs)GMSNavigationWaypoint(py)title)


  `

  #### Declaration

  Swift

      var title: String { get }

  Objective-C

      @property(nonatomic, readonly) NSString *title

- `


  ### [coordinate](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint#/c:objc(cs)GMSNavigationWaypoint(py)coordinate)


  ` The coordinates of the waypoint. This is `kCLLocationCoordinate2DInvalid` if this waypoint was
  initialized from a Place ID.

  #### Declaration

  Swift

      var coordinate: CLLocationCoordinate2D { get }

  Objective-C

      @property (nonatomic, readonly) CLLocationCoordinate2D coordinate;

- `


  ### [placeID](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint#/c:objc(cs)GMSNavigationWaypoint(py)placeID)


  ` The place ID associated with the waypoint.

  For waypoints created via `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html#/c:objc(cs)GMSNavigationWaypoint(im)initWithPlaceID:title:`, this is the place ID for the destination to
  which routing will be done.

  For waypoints created via `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html#/c:objc(cs)GMSNavigationWaypoint(im)initWithLocation:placeID:title:`, this is the place ID of the place
  to be used for arrival context when routing to the given location.

  For other waypoints, this property will be nil.

  #### Declaration

  Swift

      var placeID: String? { get }

  Objective-C

      @property (nonatomic, copy, readonly, nullable) NSString *placeID;

- `


  ### [navigationPointToken](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint#/c:objc(cs)GMSNavigationWaypoint(py)navigationPointToken)


  ` The navigation point token of this waypoint.
  This is nil if this waypoint was initialized without a navigation point token.

  #### Declaration

  Swift

      var navigationPointToken: String? { get }

  Objective-C

      @property (nonatomic, copy, readonly, nullable) NSString *navigationPointToken;

- `


  ### [preferSameSideOfRoad](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint#/c:objc(cs)GMSNavigationWaypoint(py)preferSameSideOfRoad)


  ` Whether it is preferred to route the driver to the same side of the
  road. The route will arrive on the preferred side of the road unless there is a significant
  delay caused by a road closure or slow-moving traffic. Default to NO.

  #### Declaration

  Swift

      var preferSameSideOfRoad: Bool { get }

  Objective-C

      @property (nonatomic, readonly) BOOL preferSameSideOfRoad;

- `


  ### [preferredHeading](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint#/c:objc(cs)GMSNavigationWaypoint(py)preferredHeading)


  ` An angle used to express the direction of traffic on the side of the road that the vehicle
  should arrive on. Consequently, it is not useful for one-way streets.
  Units expressed in degrees \[0, 360\], where 0 means North and angles increase clockwise.
  Default and unset value is -1.

  #### Declaration

  Swift

      var preferredHeading: Int32 { get }

  Objective-C

      @property (nonatomic, readonly) int32_t preferredHeading;

- `


  ### [vehicleStopover](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint#/c:objc(cs)GMSNavigationWaypoint(py)vehicleStopover)


  ` 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, waypoints on roads that are unsuitable for pickup
  and drop-off may be adjusted to a more suitable location. This option works only for DRIVE and
  TWO_WHEELER travel modes. Default to NO. Note: In certain cases, particularly in metro areas,
  waypoints can not be set within tunnels even if vehicleStopover is set to NO.

  #### Declaration

  Swift

      var vehicleStopover: Bool { get }

  Objective-C

      @property (nonatomic, readonly) BOOL vehicleStopover;

- `


  ### [-initWithLocation:title:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint#/c:objc(cs)GMSNavigationWaypoint(im)initWithLocation:title:)


  ` Initializes this `GMSNavigationWaypoint` to represent a location specified by 2D coordinates.

  #### Declaration

  Swift

      init?(location: CLLocationCoordinate2D, title: String)

  Objective-C

      - (nullable instancetype)initWithLocation:(CLLocationCoordinate2D)location
                                          title:(nonnull NSString *)title;

  #### Parameters

  |---|---|
  | ` location ` | The location of this waypoint. |
  | ` title ` | A string representing the name of the waypoint. |

  #### Return Value

  An instance of `GMSNavigationWaypoint,` or nil if the location is not valid.
- `


  ### [-initWithPlaceID:title:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint#/c:objc(cs)GMSNavigationWaypoint(im)initWithPlaceID:title:)


  ` Initializes this `GMSNavigationWaypoint` to represent a location specified by a Place ID.

  #### Declaration

  Swift

      init?(placeID: String, title: String)

  Objective-C

      - (nullable instancetype)initWithPlaceID:(nonnull NSString *)placeID
                                         title:(nonnull NSString *)title;

  #### Parameters

  |---|---|
  | ` placeID ` | The Google Place ID for this waypoint. |
  | ` title ` | A string representing the name of the waypoint. |

  #### Return Value

  An instance of `GMSNavigationWaypoint,` or nil if the Place ID string is nil or empty.
- `


  ### [-initWithLocation:placeID:title:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint#/c:objc(cs)GMSNavigationWaypoint(im)initWithLocation:placeID:title:)


  ` Initializes a waypoint which will route to the given location using the given placeID as context.

  If you only have either a placeID or a location, use `initWithPlaceID:title:` or
  `initWithLocation:title:`

  #### Declaration

  Swift

      init?(location: CLLocationCoordinate2D, placeID: String, title: String)

  Objective-C

      - (nullable instancetype)initWithLocation:(CLLocationCoordinate2D)location
                                        placeID:(nonnull NSString *)placeID
                                          title:(nonnull NSString *)title;

  #### Parameters

  |---|---|
  | ` location ` | The location of this waypoint. |
  | ` placeID ` | The ID of a place to be used to provide arrival context for the location. |
  | ` title ` | A string representing the name of the waypoint. |

  #### Return Value

  An instance of `GMSNavigationWaypoint`, or nil if `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html#/c:objc(cs)GMSNavigationWaypoint(py)placeID` is nil/empty, or if
  `location` is invalid.
- `


  ### [-initWithNavigationPointToken:title:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint#/c:objc(cs)GMSNavigationWaypoint(im)initWithNavigationPointToken:title:)


  ` Initializes this `GMSNavigationWaypoint` to represent a location specified by a navigation point
  token.

  #### Declaration

  Swift

      init?(navigationPointToken: String, title: String)

  Objective-C

      - (nullable instancetype)initWithNavigationPointToken:
                                   (nonnull NSString *)navigationPointToken
                                                      title:(nonnull NSString *)title;

  #### Parameters

  |---|---|
  | ` navigationPointToken ` | An opaque token returned by the Directions API that represents a precise waypoint location on the Google road network. |
  | ` title ` | A string representing the name of the waypoint. |

  #### Return Value

  An instance of `GMSNavigationWaypoint`, or nil if the navigation point token is
  empty.
- `


  ### [-initWithLocation:title:preferSameSideOfRoad:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint#/c:objc(cs)GMSNavigationWaypoint(im)initWithLocation:title:preferSameSideOfRoad:)


  ` Initializes `GMSNavigationWaypoint` to represent a location specified by 2D coordinates and side
  of road preferences.

  #### Declaration

  Swift

      convenience init?(location: CLLocationCoordinate2D, title: String, preferSameSideOfRoad: Bool)

  Objective-C

      - (nullable instancetype)initWithLocation:(CLLocationCoordinate2D)location
                                          title:(nonnull NSString *)title
                           preferSameSideOfRoad:(BOOL)preferSameSideOfRoad;

  #### Parameters

  |---|---|
  | ` location ` | The latitude and longitude of the waypoint. |
  | ` title ` | A string representing the name of the waypoint. |
  | ` preferSameSideOfRoad ` | Whether it is preferred to route the driver to the same side of the road. The route will arrive on the preferred side of the road unless there is a significant delay caused by a road closure or slow-moving traffic. |

  #### Return Value

  An instance of `GMSNavigationWaypoint,` or nil if the location is not valid.
- `


  ### [-initWithLocation:title:preferredSegmentHeading:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint#/c:objc(cs)GMSNavigationWaypoint(im)initWithLocation:title:preferredSegmentHeading:)


  ` Initializes `GMSNavigationWaypoint` to represent a location specified by 2D coordinates and side
  of road preferences.

  #### Declaration

  Swift

      convenience init?(location: CLLocationCoordinate2D, title: String, preferredSegmentHeading: Int32)

  Objective-C

      - (nullable instancetype)initWithLocation:(CLLocationCoordinate2D)location
                                          title:(nonnull NSString *)title
                        preferredSegmentHeading:(int32_t)preferredSegmentHeading;

  #### Parameters

  |---|---|
  | ` location ` | The latitude and longitude of the waypoint. |
  | ` title ` | A string representing the name of the waypoint. |
  | ` preferredSegmentHeading ` | An angle used to express the direction of traffic on the side of the road that the vehicle should arrive on. Consequently, it is not useful for one-way streets. Units expressed in degrees \[0, 360\], where 0 means North. |

  #### Return Value

  An instance of `GMSNavigationWaypoint,` or nil if the location or the
  preferredSegmentHeading is not valid.
- `


  ### [-init](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint#/c:objc(cs)GMSNavigationWaypoint(im)init)


  ` Unavailable

  #### Declaration

  Objective-C

      - (null_unspecified instancetype)init NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE;

- `


  ### [-copy](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint#/c:objc(cs)GMSNavigationWaypoint(im)copy)


  `

  #### Declaration

  Swift

      func copy() -> GMSNavigationWaypoint

  Objective-C

      - (GMSNavigationWaypoint *)copy;

- `


  ### [-mutableCopy](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint#/c:objc(cs)GMSNavigationWaypoint(im)mutableCopy)


  `

  #### Declaration

  Swift

      func mutableCopy() -> https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationMutableWaypoint.html

  Objective-C

      - (https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationMutableWaypoint.html *)mutableCopy;