Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
iOS Documentation
SDLSendLocation

SDLSendLocation Class Reference

Section Contents

Overview

SendLocation is used to send a location to the navigation system for navigation

@since RPC 3.0

-initWithAddress:addressLines:locationName:locationDescription:phoneNumber:image:deliveryMode:timeStamp:

Create a SendLocation request with an address object, without Lat/Long coordinates.

Objective-C

- (nonnull instancetype)initWithAddress:(nonnull SDLOasisAddress *)address
                           addressLines:
                               (nullable NSArray<NSString *> *)addressLines
                           locationName:(nullable NSString *)locationName
                    locationDescription:(nullable NSString *)locationDescription
                            phoneNumber:(nullable NSString *)phoneNumber
                                  image:(nullable SDLImage *)image
                           deliveryMode:(nullable SDLDeliveryMode)deliveryMode
                              timeStamp:(nullable SDLDateTime *)timeStamp;

Swift

init(address: SDLOasisAddress, addressLines: [String]?, locationName: String?, locationDescription: String?, phoneNumber: String?, image: SDLImage?, deliveryMode: SDLDeliveryMode?, timeStamp: SDLDateTime?)

Parameters

address

The address information to be passed to the nav system for determining the route

addressLines

The user-facing address

locationName

The user-facing name of the location

locationDescription

The user-facing description of the location

phoneNumber

The phone number for the location; the user could use this to call the location

image

A user-facing image for the location

deliveryMode

How the location should be sent to the nav system

timeStamp

The estimated arrival time for the location (this will also likely be calculated by the nav system later, and may be different than your estimate). This is used to show the user approximately how long it would take to navigate here

Return Value

A SendLocation object

-initWithLongitude:latitude:locationName:locationDescription:address:phoneNumber:image:

Create a SendLocation request with Lat/Long coordinate, not an address object

Objective-C

- (nonnull instancetype)
      initWithLongitude:(double)longitude
               latitude:(double)latitude
           locationName:(nullable NSString *)locationName
    locationDescription:(nullable NSString *)locationDescription
                address:(nullable NSArray<NSString *> *)address
            phoneNumber:(nullable NSString *)phoneNumber
                  image:(nullable SDLImage *)image;

Swift

init(longitude: Double, latitude: Double, locationName: String?, locationDescription: String?, address: [String]?, phoneNumber: String?, image: SDLImage?)

Parameters

longitude

The longitudinal coordinate of the location

latitude

The latitudinal coordinate of the location

locationName

The user-facing name of the location

locationDescription

The user-facing description of the location

address

The user-facing address

phoneNumber

The phone number for the location; the user could use this to call the location

image

A user-facing image for the location

Return Value

A SendLocation object

-initWithLongitude:latitude:locationName:locationDescription:displayAddressLines:phoneNumber:image:deliveryMode:timeStamp:address:

Create a SendLocation request with Lat/Long coordinate and an address object and let the nav system decide how to parse it

Objective-C

- (nonnull instancetype)
      initWithLongitude:(double)longitude
               latitude:(double)latitude
           locationName:(nullable NSString *)locationName
    locationDescription:(nullable NSString *)locationDescription
    displayAddressLines:(nullable NSArray<NSString *> *)displayAddressLines
            phoneNumber:(nullable NSString *)phoneNumber
                  image:(nullable SDLImage *)image
           deliveryMode:(nullable SDLDeliveryMode)deliveryMode
              timeStamp:(nullable SDLDateTime *)timeStamp
                address:(nullable SDLOasisAddress *)address;

Swift

init(longitude: Double, latitude: Double, locationName: String?, locationDescription: String?, displayAddressLines: [String]?, phoneNumber: String?, image: SDLImage?, deliveryMode: SDLDeliveryMode?, timeStamp: SDLDateTime?, address: SDLOasisAddress?)

Parameters

longitude

The longitudinal coordinate of the location

latitude

The latitudinal coordinate of the location

locationName

The user-facing name of the location

locationDescription

The user-facing description of the location

displayAddressLines

The user-facing address

phoneNumber

The phone number for the location; the user could use this to call the location

image

A user-facing image for the location

deliveryMode

How the location should be sent to the nav system

timeStamp

The estimated arrival time for the location (this will also likely be calculated by the nav system later, and may be different than your estimate). This is used to show the user approximately how long it would take to navigate here

address

The address information to be passed to the nav system for determining the route

Return Value

A SendLocation object

longitudeDegrees

The longitudinal coordinate of the location. Either the latitude / longitude OR the address must be provided.

Float, Optional, -180.0 - 180.0

Objective-C

@property (nonatomic, copy, nullable) NSNumber<SDLFloat> *longitudeDegrees;

Swift

@NSCopying var longitudeDegrees: (NSNumber & SDLFloat)? { get set }

latitudeDegrees

The latitudinal coordinate of the location. Either the latitude / longitude OR the address must be provided.

Float, Optional, -90.0 - 90.0

Objective-C

@property (nonatomic, copy, nullable) NSNumber<SDLFloat> *latitudeDegrees;

Swift

@NSCopying var latitudeDegrees: (NSNumber & SDLFloat)? { get set }

locationName

Name / title of intended location

Optional, Maxlength = 500 char

Objective-C

@property (nonatomic, copy, nullable) NSString *locationName;

Swift

var locationName: String? { get set }

locationDescription

Description of the intended location / establishment

Optional, MaxLength = 500 char

Objective-C

@property (nonatomic, copy, nullable) NSString *locationDescription;

Swift

var locationDescription: String? { get set }

addressLines

Location address for display purposes only.

Contains String, Optional, Max Array Length = 4, Max String Length = 500

Objective-C

@property (nonatomic, copy, nullable) NSArray<NSString *> *addressLines;

Swift

var addressLines: [String]? { get set }

phoneNumber

Phone number of intended location / establishment

Optional, Max Length = 500

Objective-C

@property (nonatomic, copy, nullable) NSString *phoneNumber;

Swift

var phoneNumber: String? { get set }

locationImage

Image / icon of intended location

Optional

Objective-C

@property (nonatomic, strong, nullable) SDLImage *locationImage;

Swift

var locationImage: SDLImage? { get set }

deliveryMode

Mode in which the sendLocation request is sent

Optional

Objective-C

@property (nonatomic, strong, nullable) SDLDeliveryMode deliveryMode;

Swift

var deliveryMode: SDLDeliveryMode? { get set }

timeStamp

Arrival time of Location. If multiple SendLocations are sent, this will be used for sorting as well.

Optional

Objective-C

@property (nonatomic, strong, nullable) SDLDateTime *timeStamp;

Swift

var timeStamp: SDLDateTime? { get set }

address

Address to be used for setting destination. Either the latitude / longitude OR the address must be provided.

Optional

Objective-C

@property (nonatomic, strong, nullable) SDLOasisAddress *address;

Swift

var address: SDLOasisAddress? { get set }
View on GitHub.com
Previous Section Next Section