MapsIndoors iOS SDK V3
|
#include <MPMapControl.h>
Class Methods | |
(BOOL) | + isMapLabelHaloEnabled |
(void) | + setMapLabelFont:showHalo: |
Convenience class for setting up a Google map with MapsIndoors venues, buildings, locations and other map content.
- (void) addDisplayRule: | (nonnull MPLocationDisplayRule *) | rule |
- (void) addDisplayRules: | (nonnull NSArray< MPLocationDisplayRule * > *) | rules |
- (void) clearMap |
Remove all markers associated with search results and selected location from the map.
- (void) clearTileCache |
- (void) disableLiveData: | (nonnull NSString *) | domainType |
End subscribing for and showing Live Data for locations in the visible map region for given MPLiveDomainType
.
Provided by category MPMapControl(LiveData).
- (void) enableLiveData: | (nonnull NSString *) | domainType |
Start subscribing for and showing Live Data for locations in the visible map region with given MPLiveDomainType
. The SDK will handle rendering of the Live Data updates. Note that the SDK will set custom display rules for this rendering. Adding your own or resetting display rules while Live Data is enabled with default rendering may break the rendering for the current MPMapControl
instance.
Provided by category MPMapControl(LiveData).
- (void) enableLiveData: | (nonnull NSString *) | domainType | |
handler: | (nonnull id< MPMappedLocationUpdateHandler >) | handler |
Start subscribing for Live Data for locations in the visible map region with given MPLiveDomainType
. Delegate will be called to handle display updates.
Provided by category MPMapControl(LiveData).
- (MPLocationDisplayRule *_Nullable) getDisplayRuleForTypeNamed: | (nonnull NSString *) | ruleName |
Get a type-displayRule by name.
ruleName | Name of type-displayRule to retrieve. |
- (MPLocationDisplayRule *_Nullable) getEffectiveDisplayRuleForLocation: | (nonnull MPLocation *) | location |
Get the currently used displayRule for the given MPLocation. Note that the returned displayRule may be, in priority-order, one of:
location | The MPLocation to retrieve the currently active displayRule for. |
- (nullable MPLocation *) getLocation: | (nonnull GMSMarker *) | marker |
Get the location that wraps the given marker.
- (nullable MPLocation *) getLocationById: | (nonnull NSString *) | idString |
Get location by string id reference.
- (void) goTo: | (nonnull MPLocation *) | location |
Focus the map on the given location.
location | The location to show on the map. |
- (nullable instancetype) initWithMap: | (nonnull GMSMapView *) | map |
Initialize a MPMapControl object with given map.
map | The map to build the map control on. |
+ (BOOL) isMapLabelHaloEnabled |
Returns whether halo is enabled for map labels.
- (void) resetDisplayRuleForLocation: | (nonnull MPLocation *) | location |
Remove any specific displayrule that has been added to the given MPLocation. Once the location-specific display rule is removed, the MPLocation will be displayed on map according to it's type-displayrule.
location | MPLocation that should have it's specific displayrule removed. |
- (void) resetDisplayRulesForLocations: | (nonnull NSArray< MPLocation * > *) | locations |
Remove any specific displayrule that has been added to the given MPLocations. Once the location-specific display rules are removed, the MPLocations will be displayed on map according to their type-displayrule.
locations | MPLocations that should have their specific displayrule removed. |
- (void) setDisplayRule: | (nullable MPLocationDisplayRule *) | rule |
Add a location display rule for a specific location type. You need to know the types applied to the map locations. The display rule name corresponds to the location type we want the rule to apply for. Adding a rule with name nil, will apply generally to all types Adding a rule with a name, will override a more general rule
rule | displayrule to add. |
- (void) setDisplayRule: | (nonnull MPLocationDisplayRule *) | rule | |
forLocation: | (nullable MPLocation *) | location |
Add a location display rule for a single MPLocation. This display rule takes precedence over more general displayrules like the type-display-rule and default display rule.
rule | Display rule to use for the given MPLocation. |
location | MPLocation that the displayrule should apply to. |
- (void) setDisplayRule: | (nonnull MPLocationDisplayRule *) | rule | |
forLocations: | (nonnull NSArray< MPLocation * > *) | locations |
Add a location display rule for multiple MPLocations. This display rule takes precedence over more general displayrules like the type-display-rule and default display rule.
rule | Display rule to use for the given MPlocations. |
locations | MPLocation's that the displayrule should apply to. |
- (void) setDisplayRuleNamed: | (nonnull NSString *) | ruleName | |
forLocation: | (nonnull MPLocation *) | location |
Apply a named displayRule to the given MPLocation. If MPMapControl does not have a displayRule with the given name, no changes is applied.
ruleName | Name of displayRule to apply to location |
location | MPLocation to apply displayRule to |
- (void) setDisplayRules: | (nonnull NSArray< MPLocationDisplayRule * > *) | rules |
Add multiple location display rules.
rules | Array of displayrules to add. |
+ (void) setMapLabelFont: | (UIFont *_Nullable) | mapLabelFont | |
showHalo: | (BOOL) | showHalo |
Set the font that MapsIndoors should use when rendering labels on the map, and enable or disable white halo for improved visibility.
- (void) setupMapWithVenue: | (nonnull NSString *) | venueName |
Setup the venue map with default providers based on MapsIndoors.solutionId.
venueName | The MapsPeople site id, used for locations and routing. |
- (void) showAreaOfLocation: | (nonnull MPLocation *) | location |
Make sure the complete geometry of the given MPLocation is visible on the map. If the location is fully visible, the visible area of the map is unchanged. If the location is not fully visible, the map is centered around the location, and if needed zoomed. This method does not change the shown floor. The maps current bearing and vieweing angle is preserved.
location | Location to show. |
- (void) showSearchResult: | (BOOL) | fitBounds |
Show a given array of locations. The display will override any zoom level condition made from display rules. Clear the locations by calling again with [showLocations:nil fitBounds:NO]
- (void) showUserPosition: | (BOOL) | show |
Show or hide the user position marker.
show | show/hide |
|
readwritenonatomicassign |
The current floor.
|
readnonatomicassign |
Current user location.
|
readwritenonatomicstrong |
Custom floor selector for the map to use. When provided, the MapControl will not create a floor selector control autonomously.
|
readnonatomicstrong |
The default display settings used by MPMapControl to display a location. Modify this object to change the default visual appearance of a location. The default appearance only applies for locations that has no other references to a display rule.
|
readwritenonatomicweak |
Delegate object containing data events
|
readatomicassign |
Floor selector UI element.
If a custom floor selector is not provided (
May be nil if a custom floor selector has been provided.
|
readwritenonatomicassign |
Hide floor selector UI element. Only applies to default floor selector; if a custom floor selector is provided, the MapControl is not repsonsible for it's visibility.
|
readwriteatomicassign |
Controls whether Location icons along a rendered route are hidden if they obstruct the route. Default is YES.
|
readwriteatomicassign |
Controls whether overlapping map markers can be resolved by grouping some of the overlapping items. Default value is NO; When set to YES, the default behavior is to group MPLocation's of the same type.
|
readwriteatomicassign |
Controls whether overlapping map markers can be resolved by hiding some of the overlapping items. Default value is YES;
|
readnonatomicstrong |
The display rule used by MPMapControl to highlight the selected location. Created and added by MPMapControl during initialization. Modify this displayrule to change the visual appearance of the location highlight.
|
readnonatomicassign |
Indicates whether or not basic data for the map has been loaded. This does not indicate whether maptiles have been loaded and displayed.
|
readwriteatomicassign |
Default map icon size
|
readwriteatomicassign |
The color that MapsIndoors should use when rendering labels on the map.
|
readwriteatomicassign |
The font that MapsIndoors should use when rendering labels on the map.
|
readwritenonatomicassign |
Whether or not to hide all map locations. Default is NO
|
readwritenonatomicassign |
The map style.
|
readwritenonatomicassign |
Current location search result.
|
readwritenonatomicassign |
Current single location selection.
|
readwritenonatomicstrong |
The accessibility label associated with the user location marker on the map. Default: "My Location"
|
readwritenonatomicstrong |
The accessibility label associated with the user location accuracy circle on the map. Default: "My location, accuracy %@m"
|
readwritenonatomicassign |
The venue name, at which the map should target its view.
|
readatomicassign |
zIndex for building outline highlight overlay
|
readatomicassign |
zIndex for location outline highlight overlay
|
readatomicassign |
zIndex of the accurqacy indicator circle.
|
readatomicassign |
zIndex of the user location marker (aka "the blue dot").
|
readatomicassign |
zIndex range reserved for 2D Model overlays managed by MapsIndoors.
|
readatomicassign |
Overall range reserved for MapsIndoors use.
|
readatomicassign |
Indexes reserved for MapsIndoors tile layers. If you are adding tilelayers to a map with MapsIndoors tiles, you should set the zIndex of your tile layer above this range to make sure your tile layer shows on top of MapsIndoors tiles.
|
readatomicassign |
zIndex range reserved for polygon overlays managed by MapsIndoors.