MapsIndoors iOS SDK V3
Loading...
Searching...
No Matches
MPMapControl.h
Go to the documentation of this file.
1//
2// MPMapControl.h
3// MapsIndoors SDK for iOS
4//
5// Created by Daniel Nielsen on 9/17/13.
6// Copyright (c) 2017 MapsPeople A/S. All rights reserved.
7//
8
9#import "MPBuilding.h"
12#import "MPVenueProvider.h"
13#import <Foundation/Foundation.h>
14#import <UIKit/UIKit.h>
15
17FOUNDATION_EXPORT double MapsIndoorsVNum;
18
20FOUNDATION_EXPORT const unsigned char MapsIndoorsVStr[];
21
22@class GMSMarker;
24@class MPLocation;
26@class MPMapStyle;
28@class MPPositionResult;
29@protocol GMSMapViewDelegate;
30@protocol MPFloorSelectorProtocol;
31@protocol MPOnlineTileLayer;
32
33#pragma mark - MPMapControlDelegate
34
35
39@protocol MPMapControlDelegate <NSObject>
43@optional
44- (void) mapContentReady;
45
49@optional
50- (void) floorDidChange:(nonnull NSNumber*)floor;
51
56@optional
57- (void) focusedBuildingDidChange:(nullable MPLocation*)building;
58
65@optional
66- (BOOL) allowAutomaticSwitchToFloor:(nonnull NSNumber*)toFloor;
67
80@optional
81- (BOOL) didTapAtCoordinate:(CLLocationCoordinate2D)coordinate withLocations:(nullable NSArray<MPLocation*>*)locations;
82
92@optional
93- (BOOL) didTapMarker:(GMSMarker*_Nonnull)marker forLocationCluster:(nullable NSArray<MPLocation*>*)locations moreZoomPossible:(BOOL)moreZoomPossible;
94
102@optional
103- (nullable UIView*) infoWindowForLocationCluster:(NSArray<MPLocation*>* _Nonnull)locationCluster;
104
112@optional
113- (CGSize) getImageSizeForLocationClusterWithCount:(NSUInteger)count clusterId:(NSString* _Nonnull)clusterId;
114
125@optional
126- (nullable UIImage*) getImageForLocationCluster:(NSArray<MPLocation*>* _Nonnull)locationCluster imageSize:(CGSize)imageSize clusterId:(NSString* _Nonnull)clusterId;
127
138@optional
139- (BOOL) getImageForLocationCluster:(NSArray<MPLocation*>* _Nonnull)locationCluster imageSize:(CGSize)imageSize clusterId:(NSString* _Nonnull)clusterId completion:(void(^_Nonnull)(UIImage* _Nullable image))completion;
140
146@optional
147- (void) onPositionUpdate:(nonnull MPPositionResult*)positionResult;
148
154@optional
155- (void) willUpdateLocationsOnMap:(nonnull NSArray<MPLocation*>*)locations NS_SWIFT_NAME(willUpdateLocationsOnMap(locations:));;
156
162@optional
163- (void) onError:(NSError* _Nonnull)error;
164
165@end
166
167
168#pragma mark - MPMapControl
169
170
175
179@property (nonatomic, weak, nullable) id<MPMapControlDelegate> delegate;
180
185@property (nonatomic, strong, nullable) id<MPFloorSelectorProtocol> customFloorSelector;
186
197@property (readonly, nullable) MPFloorSelectorControl* floorSelector;
198
203@property (nonatomic) BOOL floorSelectorHidden;
204
209@property (nonatomic, nullable, readonly) MPPositionIndicator* currentPosition DEPRECATED_ATTRIBUTE;
213@property (nonatomic, nullable) MPLocation* selectedLocation;
217@property (nonatomic, nullable) NSArray<MPLocation*>* searchResult;
221@property (nonatomic, nullable) NSNumber* currentFloor;
225@property (nonatomic, nullable) MPMapStyle* mapStyle;
229@property (nonatomic) BOOL mapLocationsHidden;
233@property (nonatomic, nullable) NSString* venue;
234
239@property (nonatomic, readonly) BOOL mapContentReady;
240
245- (nullable instancetype)initWithMap:(nonnull GMSMapView*) map;
246
251- (void) setupMapWithVenue:(nonnull NSString*)venueName;
252
256- (nullable MPLocation*)getLocation:(nonnull GMSMarker*) marker;
257
261- (nullable MPLocation*)getLocationById:(nonnull NSString*) idString;
262
267- (void)showSearchResult:(BOOL)fitBounds;
268
269
270#pragma mark - Display rule support
271
281- (void) setDisplayRule:(nullable MPLocationDisplayRule*)rule;
282
290- (void) setDisplayRules:(nonnull NSArray<MPLocationDisplayRule*>*)rules;
291
299- (void) setDisplayRule:(nonnull MPLocationDisplayRule*)rule forLocation:(nullable MPLocation*)location;
300
308- (void) setDisplayRule:(nonnull MPLocationDisplayRule*)rule forLocations:(nonnull NSArray<MPLocation*>*)locations;
309
317- (void) setDisplayRuleNamed:(nonnull NSString*)ruleName forLocation:(nonnull MPLocation*)location;
318
325- (MPLocationDisplayRule* _Nullable) getDisplayRuleForTypeNamed:(nonnull NSString*)ruleName;
326
338- (MPLocationDisplayRule* _Nullable) getEffectiveDisplayRuleForLocation:(nonnull MPLocation*)location;
339
346- (void) resetDisplayRuleForLocation:(nonnull MPLocation*)location;
347
354- (void) resetDisplayRulesForLocations:(nonnull NSArray<MPLocation*>*)locations;
355
361@property (nonatomic, strong, readonly) MPLocationDisplayRule* _Nullable locationHighlightDisplayRule;
362
368@property (nonatomic, strong, readonly) MPLocationDisplayRule* _Nullable defaultDisplayRule;
369
370
371#pragma mark - Configuration
375@property (class, nullable) UIFont* mapLabelFont;
376
380@property (class, nullable) UIColor* mapLabelColor;
381
385@property(class) CGSize mapIconSize;
386
391
395+ (void)setMapLabelFont:(UIFont * _Nullable)mapLabelFont showHalo: (BOOL) showHalo;
396
402@property(class) BOOL locationClusteringEnabled;
403
409
413@property (class) BOOL hideIconsOverlappingRoute;
414
418@property (readonly) NSRange zIndexRangeForMapsIndoorsOverlays;
419
423@property (readonly) NSRange zIndexRangeForPolygonOverlays;
424
428@property (readonly) NSRange zIndexRangeFor2DModelOverlays;
429
433@property (readonly) int zIndexForUserLocationMarker;
434
438@property (readonly) int zIndexForPositioningAccuracyCircle;
439
443@property (readonly) int zIndexForBuildingOutlineHighlight;
444
448@property (readonly) int zIndexForLocationOutlineHighlight;
449
454@property (readonly) NSRange zIndexRangeForMapsIndoorsTileLayers;
455
456
457#pragma mark -
458
459- (void)clearTileCache;
460
464- (void)clearMap;
465
471- (void)showUserPosition:(BOOL)show;
472
478- (void)goTo:(nonnull MPLocation*)location;
479
489- (void) showAreaOfLocation:(nonnull MPLocation*)location;
490
491
492#pragma mark - Accessibility support
493
498@property (nonatomic, strong, nullable) NSString* userLocationAccessibilityLabel;
499
504@property (nonatomic, strong, nullable) NSString* userLocationAccuracyAccessibilityLabel;
505
506
507
508#pragma mark - Deprecations
513- (void) addDisplayRule:(nonnull MPLocationDisplayRule*)rule DEPRECATED_ATTRIBUTE;
514
519- (void) addDisplayRules:(nonnull NSArray<MPLocationDisplayRule*>*)rules DEPRECATED_ATTRIBUTE;
520
521@end
FOUNDATION_EXPORT const unsigned char MapsIndoorsVStr[]
Project version string for MapsIndoors.
Definition MPMapControl.h:20
FOUNDATION_EXPORT double MapsIndoorsVNum
Project version number for MapsIndoors.
Definition MPMapControl.h:17
@ image
Definition NSString+CustomFont.h:45
Definition MPFloorSelectorControl.h:22
Definition MPLocationDisplayRule.h:22
Definition MPLocation.h:38
Definition MPMapControl.h:174
BOOL floorSelectorHidden
Definition MPMapControl.h:203
MPPositionIndicator * currentPosition
Definition MPMapControl.h:209
MPFloorSelectorControl * floorSelector
Definition MPMapControl.h:197
MPLocationDisplayRule *_Nullable defaultDisplayRule
Definition MPMapControl.h:368
int zIndexForPositioningAccuracyCircle
Definition MPMapControl.h:438
BOOL isMapLabelHaloEnabled()
MPLocationDisplayRule *_Nullable locationHighlightDisplayRule
Definition MPMapControl.h:361
UIFont * mapLabelFont
Definition MPMapControl.h:375
id< MPFloorSelectorProtocol > customFloorSelector
Definition MPMapControl.h:185
NSRange zIndexRangeFor2DModelOverlays
Definition MPMapControl.h:428
NSNumber * currentFloor
Definition MPMapControl.h:221
NSString * venue
Definition MPMapControl.h:233
NSString * userLocationAccessibilityLabel
Definition MPMapControl.h:498
MPMapStyle * mapStyle
Definition MPMapControl.h:225
BOOL hideIconsOverlappingRoute
Definition MPMapControl.h:413
NSRange zIndexRangeForMapsIndoorsOverlays
Definition MPMapControl.h:418
int zIndexForUserLocationMarker
Definition MPMapControl.h:433
NSRange zIndexRangeForPolygonOverlays
Definition MPMapControl.h:423
BOOL locationClusteringEnabled
Definition MPMapControl.h:402
BOOL mapLocationsHidden
Definition MPMapControl.h:229
NSRange zIndexRangeForMapsIndoorsTileLayers
Definition MPMapControl.h:454
id< MPMapControlDelegate > delegate
Definition MPMapControl.h:179
MPLocation * selectedLocation
Definition MPMapControl.h:213
CGSize mapIconSize
Definition MPMapControl.h:385
int zIndexForBuildingOutlineHighlight
Definition MPMapControl.h:443
BOOL locationHideOnIconOverlapEnabled
Definition MPMapControl.h:408
NSString * userLocationAccuracyAccessibilityLabel
Definition MPMapControl.h:504
UIColor * mapLabelColor
Definition MPMapControl.h:380
void clearTileCache()
NSArray< MPLocation * > * searchResult
Definition MPMapControl.h:217
BOOL mapContentReady
Definition MPMapControl.h:239
int zIndexForLocationOutlineHighlight
Definition MPMapControl.h:448
Definition MPMapStyle.h:15
Definition MPOnlineTileLayer.h:15
Definition MPPositionIndicator.h:14
Definition MPPositionResult.h:18
Definition MPBuilding.h:23
Definition MPFloorSelectorProtocol.h:50
Definition MPPositionProvider.h:23
Definition MPVenueProvider.h:71