GMSNavigationLicensePlateRestriction
@interface GMSNavigationLicensePlateRestriction : NSObject
A class contains information for license plate restriction. It maintains the state of vehicle’s license plate information and restriction.
-
Initializes a license plate restriction object. Set license plate restriction with current vehicle’s last digit of license plate and country code. This allows us to route around certain types of road restrictions which are based on license plate number.
Declaration
Swift
init?(licensePlateLastDigit lastDigit: Int, countryCode: String)
Objective-C
- (nullable instancetype)initWithLicensePlateLastDigit:(NSInteger)lastDigit countryCode: (nonnull NSString *)countryCode;
Parameters
lastDigit
the last digit of the current vehicle’s license plate. This value must be between 0 and 9.
countryCode
the country code of the current vehicle’s license plate. Currently Indonesia (ID) and Brazil (BZ) are supported.
Return Value
nil
if license plate’s last digit or country code is invalid. -
Returns the country code for license plate restriction set by a user.
Defaults to empty string.
Declaration
Swift
var countryCode: String { get }
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull countryCode;
-
Returns the last digit of vehicle’s license plate number.
Defaults to -1.
Declaration
Swift
var lastDigit: Int { get }
Objective-C
@property (nonatomic, readonly) NSInteger lastDigit;