MapsIndoors iOS SDK V3
Loading...
Searching...
No Matches
MPRoutingProvider.h
Go to the documentation of this file.
1//
2// MPRoutingProvider.h
3// Indoor
4//
5// Created by Daniel Nielsen on 1/14/14.
6// Copyright (c) 2014 MapsPeople A/S. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10#import "MPPoint.h"
11#import "MPRoute.h"
12
13
14@class MPUserRole;
15
16
20@protocol MPRoutingProviderDelegate <NSObject>
25@required
26- (void) onRouteResultReady: (nonnull MPRoute*)route;
27@end
28
35typedef void(^mpRouteHandlerBlockType)(MPRoute* _Nullable route, NSError* _Nullable error);
36
37
38@interface MPRoutingProvider : NSObject
39
40@property (nonatomic, weak, nullable) id <MPRoutingProviderDelegate> delegate;
41@property (nonatomic, strong, nullable) NSString* solutionId;
42@property (nonatomic, strong, nullable) NSString* googleApiKey;
43@property (nonatomic, strong, nullable) NSString* venue;
44@property (nonatomic, strong, nullable) NSString* vehicle;
45@property (nonatomic, strong, nullable) NSString* language;
46
47
48#pragma mark - Initializers
49- (nullable instancetype) initWithArea:(nonnull NSString *)venueName;
50- (nullable instancetype) initWithMapsIndoorsSolutionId:(nonnull NSString *)solutionId googleApiKey: (nonnull NSString*) googleApiKey;
51
52#pragma mark - Delegate-based routing methods
53- (void) getRoutingFrom:(nonnull MPPoint*)from to:(nonnull MPPoint*)to by:(nonnull NSString*)mode avoid:(nullable NSArray*)restrictions;
54- (void) getRoutingFrom:(nonnull MPPoint*)from to:(nonnull MPPoint*)to by:(nonnull NSString*)mode avoid:(nullable NSArray*)restrictions depart:(nullable NSDate*)departureTime arrive:(nullable NSDate*)arrivalTime;
55- (void) getRoutingFrom:(nonnull MPPoint*)from to:(nonnull MPPoint*)to by:(nonnull NSString*)mode avoid:(nullable NSArray*)restrictions depart:(nullable NSDate*)departureTime arrive:(nullable NSDate*)arrivalTime userRoles:(nullable NSArray<MPUserRole*>*)userRoles;
56- (void) getGoogleRoutingFrom:(nonnull NSString*)from to:(nonnull NSString*)to by:(nonnull NSString*)mode avoid:(nullable NSArray*)restrictions;
57- (void) getGoogleRoutingFrom:(nonnull NSString*)from to:(nonnull NSString*)to by:(nonnull NSString*)mode avoid:(nullable NSArray*)restrictions depart:(nullable NSDate*)departureTime arrive:(nullable NSDate*)arrivalTime;
58
59#pragma mark - completion handler based routing methods
60- (void) getRoutingFrom:(nonnull MPPoint*)from to:(nonnull MPPoint*)to by:(nonnull NSString*)mode avoid:(nullable NSArray*)restrictions completionHandler:(nullable mpRouteHandlerBlockType)handler;
61- (void) getRoutingFrom:(nonnull MPPoint*)from to:(nonnull MPPoint*)to by:(nonnull NSString*)mode avoid:(nullable NSArray*)restrictions depart:(nullable NSDate*)departureTime arrive:(nullable NSDate*)arrivalTime completionHandler:(nullable mpRouteHandlerBlockType)handler;
62- (void) getRoutingFrom:(nonnull MPPoint*)from to:(nonnull MPPoint*)to by:(nonnull NSString*)mode avoid:(nullable NSArray*)restrictions depart:(nullable NSDate*)departureTime arrive:(nullable NSDate*)arrivalTime userRoles:(nullable NSArray<MPUserRole*>*)userRoles completionHandler:(nullable mpRouteHandlerBlockType)handler;
63- (void) getGoogleRoutingFrom:(nonnull NSString*)from to:(nonnull NSString*)to by:(nonnull NSString*)mode avoid:(nullable NSArray*)restrictions completionHandler:(nullable mpRouteHandlerBlockType)handler;
64- (void) getGoogleRoutingFrom:(nonnull NSString*)from to:(nonnull NSString*)to by:(nonnull NSString*)mode avoid:(nullable NSArray*)restrictions depart:(nullable NSDate*)departureTime arrive:(nullable NSDate*)arrivalTime completionHandler:(nullable mpRouteHandlerBlockType)handler;
65
66@end
void(^ mpRouteHandlerBlockType)(MPRoute *_Nullable route, NSError *_Nullable error)
Definition MPRoutingProvider.h:35
Definition MPPoint.h:23
Definition MPRoute.h:43
Definition MPRoutingProvider.h:39
id< MPRoutingProviderDelegate > delegate
Definition MPRoutingProvider.h:40
NSString * googleApiKey
Definition MPRoutingProvider.h:42
NSString * vehicle
Definition MPRoutingProvider.h:44
NSString * language
Definition MPRoutingProvider.h:45
NSString * solutionId
Definition MPRoutingProvider.h:41
NSString * venue
Definition MPRoutingProvider.h:43
Definition MPUserRole.h:14