MapsIndoors iOS SDK V3
Loading...
Searching...
No Matches
Instance Methods | List of all members
<MPMapControlDelegate> Protocol Reference

#include <MPMapControl.h>

Inheritance diagram for <MPMapControlDelegate>:

Instance Methods

(void) - mapContentReady
 
(void) - floorDidChange:
 
(void) - focusedBuildingDidChange:
 
(BOOL) - allowAutomaticSwitchToFloor:
 
(BOOL) - didTapAtCoordinate:withLocations:
 
(BOOL) - didTapMarker:forLocationCluster:moreZoomPossible:
 
(nullable UIView *) - infoWindowForLocationCluster:
 
(CGSize) - getImageSizeForLocationClusterWithCount:clusterId:
 
(nullable UIImage *) - getImageForLocationCluster:imageSize:clusterId:
 
(BOOL) - getImageForLocationCluster:imageSize:clusterId:completion:
 
(void) - onPositionUpdate:
 
(void) - willUpdateLocationsOnMap:
 
(void) - onError:
 

Detailed Description

Delegate protocol specification to hold the floor change event.

Method Documentation

◆ allowAutomaticSwitchToFloor:

- (BOOL) allowAutomaticSwitchToFloor: (nonnull NSNumber *) toFloor
optional

Called when MPMapControl wants to automatically switch floor, for example when the map is panned and the visible buildings have changed.

Parameters
toFloorThe floor being changed to.
Returns
YES if the floor change is allowed, else NO.

◆ didTapAtCoordinate:withLocations:

- (BOOL) didTapAtCoordinate: (CLLocationCoordinate2D) coordinate
withLocations: (nullable NSArray< MPLocation * > *) locations 
optional

Called when the user taps the map.

If this delegate-method is not implemented, MPMapControl's default behaviour is used. If this method is implemented, returning YES will still invoke default baheviour.

The default handling by MPMapControl is to select the first item in the locations-list, and add a highlight to the area of the location.

Parameters
coordinateTap coordinate
locationsList of MPLocations at that point
Returns
YES to invoke default behaviour, NO to disable default behaviour.

◆ didTapMarker:forLocationCluster:moreZoomPossible:

- (BOOL) didTapMarker: (GMSMarker *_Nonnull) marker
forLocationCluster: (nullable NSArray< MPLocation * > *) locations
moreZoomPossible: (BOOL) moreZoomPossible 
optional

Callback for the app to know and determine what should happen when a POI group/cluster marker is tapped.

Parameters
markerThe marker that was tapped
locationsThe MPlocations that was grouped.
moreZoomPossibleYES if the map is able to zoom more in, else NO.
Returns
YES to enable the default behaviour, which is to zoom to the area of the POI group if possible, else show an info window for the POI group.
NO if no further handling of the maker-tap should occur.

◆ floorDidChange:

- (void) floorDidChange: (nonnull NSNumber *) floor
optional

Show flooar changed event method. Can be implemented by delegate object.

◆ focusedBuildingDidChange:

- (void) focusedBuildingDidChange: (nullable MPLocation *) building
optional

Focused building changed event method.

Parameters
buildingThe focused building on the map, may be nil.

◆ getImageForLocationCluster:imageSize:clusterId:

- (nullable UIImage *) getImageForLocationCluster: (NSArray< MPLocation * > *_Nonnull) locationCluster
imageSize: (CGSize) imageSize
clusterId: (NSString *_Nonnull) clusterId 
optional

Callback for synchronously providing an image for a POI group (aka POI cluster). If both the async and sync variants of this method is implemented, the asynchronous variant is used.

Parameters
locationClusterList of grouped POIs
imageSizeThe image size to return.
clusterIdclusterId of the poi group.
Returns
YES if the image request is accepted, essentially promising to call the completion block at some point in the future.
NO if the image request will not be fulfilled by the completion handler. Returning NO make the map show the default grouping image.

◆ getImageForLocationCluster:imageSize:clusterId:completion:

- (BOOL) getImageForLocationCluster: (NSArray< MPLocation * > *_Nonnull) locationCluster
imageSize: (CGSize) imageSize
clusterId: (NSString *_Nonnull) clusterId
completion: (void(^)(UIImage *_Nullable image)) completion 
optional

Callback for asynchronously providing an image for a POI group (aka POI cluster).

Parameters
locationClusterList of grouped POIs
imageSizeThe image size to return.
clusterIdclusterId of the poi group.
completioncompletion handler to deliver the image.
Returns
YES if the image request is accepted, essentially promising to call the completion block at some point in the future.
NO if the image request will not be fulfilled by the completion handler. Returning NO make the map show the default grouping image.

◆ getImageSizeForLocationClusterWithCount:clusterId:

- (CGSize) getImageSizeForLocationClusterWithCount: (NSUInteger) count
clusterId: (NSString *_Nonnull) clusterId 
optional

Callback for the application to determine the size of the grouping/clustering image representing a poi group.

Parameters
countThe number of POIs grouped into a cluster.
clusterIdThe clusterId that size is requested for.
Returns
size.

◆ infoWindowForLocationCluster:

- (nullable UIView *) infoWindowForLocationCluster: (NSArray< MPLocation * > *_Nonnull) locationCluster
optional

Called to get an infoWindow for a map-marker representing a poi-group.

Parameters
locationClusterThe MPLocations in the group.
Returns
nil to use default info window.
UIView* to use a specific, application-created, infoWindow.

◆ mapContentReady

- (void) mapContentReady
optional

Data ready event method. Can be implemented by delegate object.

◆ onError:

- (void) onError: (NSError *_Nonnull) error
optional

Called when an error occurs in MPMapControl. The error code will reveal what kind of error was emitted. kMPErrorCode- definitions.

Parameters
errorThe error object.

◆ onPositionUpdate:

- (void) onPositionUpdate: (nonnull MPPositionResult *) positionResult
optional

Called when MPMapControl receives a new position update.

Parameters
positionResultThe position result as estimated or calculated by a
See also
MPPositionProvider

◆ willUpdateLocationsOnMap:

- (void) willUpdateLocationsOnMap: (nonnull NSArray< MPLocation * > *) locations
optional

Called when MPMapControl receives a location update.

Parameters
locationsThe locations that will be updated