MapsIndoors iOS SDK V3
Loading...
Searching...
No Matches
MPDistanceMatrixProvider.h
Go to the documentation of this file.
1//
2// MPDistanceMatrixProvider.h
3// MapsIndoors
4//
5// Created by Daniel Nielsen on 21/09/15.
6// Copyright (c) 2015 MapsPeople A/S. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
11
12
13@class MPUserRole;
14typedef void(^mpMatrixHandlerBlockType)(MPDistanceMatrixResult* _Nullable matrixResult, NSError* _Nullable error);
15
16
17@protocol MPDistanceMatrixProviderDelegate <NSObject>
22@required
23- (void) onDistanceMatrixResultReady: (nonnull MPDistanceMatrixResult*)distanceMatrixResult;
24@end
25
26
27@interface MPDistanceMatrixProvider : NSObject
28
29@property (nonatomic, weak, nullable) id <MPDistanceMatrixProviderDelegate> delegate;
30@property (nonatomic, strong, nullable) NSString* solutionId;
31@property (nonatomic, strong, nullable) NSString* googleApiKey;
32@property (nonatomic, strong, nullable) NSString* graphId;
33@property (nonatomic, strong, nullable) NSString* vehicle;
34
35#pragma mark - MapsIndoors distance matrix
36
37- (void) getDistanceMatrixWithOrigins:(nonnull NSArray*)origins
38 destinations:(nonnull NSArray*)destinations
39 travelMode:(nonnull NSString*)travelMode
40 avoid:(nullable NSArray*)restrictions
41 depart:(nullable NSDate*)departureTime
42 arrive:(nullable NSDate*)arrivalTime
43 userRoles:(nullable NSArray<MPUserRole*>*)userRoles
44 completionHandler:(nullable mpMatrixHandlerBlockType)handler;
45
46- (void) getDistanceMatrixWithOrigins:(nonnull NSArray*)origins
47 destinations:(nonnull NSArray*)destinations
48 travelMode:(nonnull NSString*)travelMode
49 avoid:(nullable NSArray*)restrictions
50 depart:(nullable NSDate*)departureTime
51 arrive:(nullable NSDate*)arrivalTime
52 completionHandler:(nullable mpMatrixHandlerBlockType)handler;
53
54- (void) getDistanceMatrixWithOrigins:(nonnull NSArray*)origins
55 destinations:(nonnull NSArray*)destinations
56 travelMode:(nonnull NSString*)travelMode;
57
58
59#pragma mark - Google distance matrix
60- (void) getGoogleDistanceMatrixWithOrigins:(nonnull NSArray*)origins
61 destinations:(nonnull NSArray*)destinations
62 travelMode:(nonnull NSString*)travelMode
63 avoid:(nullable NSArray*)restrictions
64 depart:(nullable NSDate*)departureTime
65 arrive:(nullable NSDate*)arrivalTime
66 completionHandler:(nullable mpMatrixHandlerBlockType)handler;
67
68- (void) getGoogleDistanceMatrixWithOrigins:(nonnull NSArray*)origins
69 destinations:(nonnull NSArray*)destinations
70 travelMode:(nonnull NSString*)travelMode;
71
72@end
void(^ mpMatrixHandlerBlockType)(MPDistanceMatrixResult *_Nullable matrixResult, NSError *_Nullable error)
Definition MPDistanceMatrixProvider.h:14
Definition MPDistanceMatrixProvider.h:28
NSString * vehicle
Definition MPDistanceMatrixProvider.h:33
id< MPDistanceMatrixProviderDelegate > delegate
Definition MPDistanceMatrixProvider.h:29
NSString * graphId
Definition MPDistanceMatrixProvider.h:32
NSString * solutionId
Definition MPDistanceMatrixProvider.h:30
NSString * googleApiKey
Definition MPDistanceMatrixProvider.h:31
Definition MPDistanceMatrixResult.h:6
Definition MPUserRole.h:14