GMSNavigationMutableWaypoint Class Reference

GMSNavigationMutableWaypoint Class Reference

Overview

A mutable waypoint class.

Inherits GMSNavigationWaypoint.

Public Member Functions

(nullable instancetype) - initWithLocation:title:
 Initializes this GMSNavigationWaypoint to represent a location specified by 2D coordinates.
(nullable instancetype) - initWithPlaceID:title:
 Initializes this GMSNavigationWaypoint to represent a location specified by a Place ID.
(nullable instancetype) - initWithLocation:title:preferSameSideOfRoad:
 Initializes GMSNavigationWaypoint to represent a location specified by 2D coordinates and side of road preferences.
(nullable instancetype) - initWithLocation:title:preferredSegmentHeading:
 Initializes GMSNavigationWaypoint to represent a location specified by 2D coordinates and side of road preferences.
(GMSNavigationWaypoint *) - copy
 Returns a copy of this waypoint.
(GMSNavigationMutableWaypoint *) - mutableCopy
 Returns a mutable copy of this waypoint.

Properties

BOOL preferSameSideOfRoad
 Whether it is preferred to route the driver to the same side of the road.
int32_t preferredHeading
 An angle used to express the direction of traffic on the side of the road that the vehicle should arrive on.
BOOL vehicleStopover
 Indicates that the waypoint is meant for vehicles to stop at, where the intention is to either pickup or drop-off.
NSString * title
 The name of the waypoint.
CLLocationCoordinate2D coordinate
 The coordinates of the waypoint.
NSString * placeID
 The Place ID of this waypoint.

Member Function Documentation

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

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

Parameters:
locationThe location of this waypoint.
titleA string representing the name of the waypoint.
Returns:
An instance of GMSNavigationWaypoint, or nil if the location is not valid.
- (nullable instancetype) initWithPlaceID: (NSString *)  placeID
title: (NSString *)  title 

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

Parameters:
placeIDThe Google Place ID for this waypoint.
titleA string representing the name of the waypoint.
Returns:
An instance of GMSNavigationWaypoint, or nil if the Place ID string is nil or empty.
- (nullable instancetype) initWithLocation: (CLLocationCoordinate2D)  location
title: (NSString *)  title
preferSameSideOfRoad: (BOOL)  preferSameSideOfRoad 

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

Parameters:
locationThe latitude and longitude of the waypoint.
titleA string representing the name of the waypoint.
preferSameSideOfRoadWhether 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.
Returns:
An instance of GMSNavigationWaypoint, or nil if the location is not valid.
- (nullable instancetype) initWithLocation: (CLLocationCoordinate2D)  location
title: (NSString *)  title
preferredSegmentHeading: (int32_t)  preferredSegmentHeading 

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

Parameters:
locationThe latitude and longitude of the waypoint.
titleA string representing the name of the waypoint.
preferredSegmentHeadingAn 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.
Returns:
An instance of GMSNavigationWaypoint, or nil if the location or the preferredSegmentHeading is not valid.

Returns a copy of this waypoint.

Returns a mutable copy of this waypoint.


Property Documentation

- (BOOL) preferSameSideOfRoad [read, write, assign]

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. Setting this to true clears any value in preferredHeading.

Implements GMSNavigationWaypoint.

- (int32_t) preferredHeading [read, write, assign]

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. Setting a valid value will clear the preferSameSideOfRoad.

Implements GMSNavigationWaypoint.

- (BOOL) vehicleStopover [read, write, assign]

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.

Implements GMSNavigationWaypoint.

- (NSString*) title [read, assign, inherited]

The name of the waypoint.

- (CLLocationCoordinate2D) coordinate [read, assign, inherited]

The coordinates of the waypoint.

This is kCLLocationCoordinate2DInvalid if this waypoint was initialized from a Place ID.

- (NSString*) placeID [read, copy, inherited]

The Place ID of this waypoint.

This is nil if this waypoint was initialized from coordinates.