MSFValhallaOnlineRoutingService
Objective-C
@interface MSFValhallaOnlineRoutingService : MSFRoutingService
Swift
class MSFValhallaOnlineRoutingService : MSFRoutingService
An online routing service that uses MapBox Valhalla routing service.
As the class connects to an external (non-Massif) service, this class is provided “as-is”,
future changes from the service provider may not be compatible with the implementation.
Routing and route matching perform network requests and must be executed in non-UI background thread.
Be sure to read the Terms and Conditions of your Valhalla service provider to see if the
service is available for your application.
Note: this class is experimental and may change or even be removed in future SDK versions.
-
Constructs a new ValhallaOnlineRoutingService instance given database file.
Declaration
Objective-C
- (id)initWithApiKey:(NSString *)apiKey;Swift
init!(apiKey: String!)Parameters
apiKeyThe API key (access token) to use registered with MapBox.
-
Undocumented
Declaration
Objective-C
- (id)init;Swift
init!() -
Returns the custom backend service URL.
Declaration
Objective-C
- (NSString *)getCustomServiceURL;Swift
func getCustomServiceURL() -> String!Return Value
The custom backend service URL. If this is not defined, an empty string is returned.
-
Sets the custom backend service URL. The custom URL should contain tag “{service}”, it will be substituted by the SDK by the service type the SDK needs to perform (“route” or “trace_route”). The custom URL may also contain tag “{api_key}” which will be substituted with the set API key.
Declaration
Objective-C
- (void)setCustomServiceURL:(NSString *)serviceURL;Swift
func setCustomServiceURL(_ serviceURL: String!)Parameters
serviceURLThe custom backend service URL to use. If this is empty, then the default service is used.
-
Returns the current timeout value.
Declaration
Objective-C
- (int)getTimeout;Swift
func getTimeout() -> Int32Return Value
The current timeout value in seconds. If negative, then default platform-specific timeout is used.
-
Sets the current timeout value.
Declaration
Objective-C
- (void)setTimeout:(int)timeout;Swift
func setTimeout(_ timeout: Int32)Parameters
timeoutThe new timeout value in seconds. If negative, then default platform-specific timeout is used.
-
Returns the current set of HTTP headers used. Initially this set is empty and can be changed with setHTTPHeaders.
Declaration
Objective-C
- (MSFStringMap *)getHTTPHeaders;Swift
func getHTTPHeaders() -> MSFStringMap!Return Value
The current set of custom HTTP headers.
-
Sets HTTP headers for all requests. Calling this method will invalidate the datasource and all layers using this data source will be refreshed.
Declaration
Objective-C
- (void)setHTTPHeaders:(MSFStringMap *)headers;Swift
func setHTTPHeaders(_ headers: MSFStringMap!)Parameters
headersA map of HTTP headers that will be used in subsequent requests.
-
Undocumented
Declaration
Objective-C
- (NSString *)getProfile;Swift
func getProfile() -> String! -
Undocumented
Declaration
Objective-C
-(NSString*)getProfileSwigExplicitMSFValhallaOnlineRoutingService;Swift
func getProfileSwigExplicitMSFValhallaOnlineRoutingService() -> String! -
Undocumented
Declaration
Objective-C
- (void)setProfile:(NSString *)profile;Swift
func setProfile(_ profile: String!) -
Undocumented
Declaration
Objective-C
-(void)setProfileSwigExplicitMSFValhallaOnlineRoutingService: (NSString*)profile;Swift
func setProfileSwigExplicit(_ profile: String!) -
Undocumented
Declaration
Objective-C
- (MSFRouteMatchingResult *)matchRoute:(MSFRouteMatchingRequest *)request;Swift
func matchRoute(_ request: MSFRouteMatchingRequest!) -> MSFRouteMatchingResult! -
Undocumented
Declaration
Objective-C
-(MSFRouteMatchingResult*)matchRouteSwigExplicitMSFValhallaOnlineRoutingService: (MSFRouteMatchingRequest*)request;Swift
func matchRouteSwigExplicitMSFValhallaOnlineRoutingService(_ request: MSFRouteMatchingRequest!) -> MSFRouteMatchingResult! -
Undocumented
Declaration
Objective-C
- (MSFRoutingResult *)calculateRoute:(MSFRoutingRequest *)request;Swift
func calculateRoute(_ request: MSFRoutingRequest!) -> MSFRoutingResult! -
Undocumented
Declaration
Objective-C
-(MSFRoutingResult*)calculateRouteSwigExplicitMSFValhallaOnlineRoutingService: (MSFRoutingRequest*)request;Swift
func calculateRouteSwigExplicitMSFValhallaOnlineRoutingService(_ request: MSFRoutingRequest!) -> MSFRoutingResult! -
Undocumented
Declaration
Objective-C
-(void)dealloc;Swift
func dealloc()