MapViewController
Objective-C
@interface MapViewController : UIViewController
Swift
class MapViewController : UIViewController
An object that manages a interactive map view.
-
Init the map view with the following ppi and scale value.
Declaration
Objective-C
- (nonnull instancetype)initWithPpi:(NSInteger)ppi scale:(CGFloat)scale;
Swift
init(ppi: Int, scale: CGFloat)
Parameters
ppi
Screen pixel per inch.
scale
Screen scale factor.
-
The initial position coordinates.
Declaration
Objective-C
@property (nonatomic, strong) CoordinatesObject *_Nonnull initialPosition;
Swift
var initialPosition: CoordinatesObject { get set }
-
The initial zoom level.
Declaration
Objective-C
@property (nonatomic) NSInteger initialZoomLevel;
Swift
var initialZoomLevel: Int { get set }
-
Returns the model data.
Declaration
Objective-C
- (nonnull void *)getModelData;
-
Destroy the map view.
Declaration
Objective-C
- (void)destroy;
Swift
func destroy()
-
The delegate for the map view controller.
Declaration
Objective-C
@property (nonatomic, weak) NSObject<MapViewControllerDelegate> *_Nullable delegate;
Swift
weak var delegate: (any MapViewControllerDelegate)? { get set }
-
Disable the behaviour of the map when tapping on the compass view. Default to false.
Declaration
Objective-C
@property (nonatomic) BOOL disableCompassViewTapBehaviour;
Swift
var disableCompassViewTapBehaviour: Bool { get set }
-
Start map render.
Declaration
Objective-C
- (void)startRender;
Swift
func startRender()
-
Stop map render.
Declaration
Objective-C
- (void)stopRender;
Swift
func stopRender()
-
Check if render is active.
Declaration
Objective-C
- (BOOL)isRenderActive;
Swift
func isRenderActive() -> Bool
-
Returns the map preferences context.
Declaration
Objective-C
- (nonnull MapViewPreferencesContext *)getPreferences;
Swift
func getPreferences() -> MapViewPreferencesContext
-
Stop the current animation.
Declaration
Objective-C
- (void)skipAnimation:(BOOL)jumpToDestination;
Swift
func skipAnimation(_ jumpToDestination: Bool)
Parameters
jump
True if we want to jump to the destination when stopping animation; otherwise stop immediately.
-
Check if there is an animation in progress.
Declaration
Objective-C
- (BOOL)isAnimationInProgress;
Swift
func isAnimationInProgress() -> Bool
-
Returns the UIView scale factor.
Declaration
Objective-C
- (CGFloat)getScaleFactor;
Swift
func getScaleFactor() -> CGFloat
-
Returns the ppi factor.
Declaration
Objective-C
- (NSInteger)getPpiFactor;
Swift
func getPpiFactor() -> Int
-
Returns view viewport in parent screen coordinates.
Declaration
Objective-C
- (CGRect)getViewport;
Swift
func getViewport() -> CGRect
-
Set the fonts modifiers. @details The modifiers apply to all fonts in screen to improve their visibility & readability.
Declaration
Objective-C
- (void)setFontModifiersScale:(CGFloat)value boldStyle:(BOOL)state;
Swift
func setFontModifiersScale(_ value: CGFloat, boldStyle state: Bool)
-
Set the textures scale factor. @details The scale factor applies to all textures rendered in screen to improve their visibility & readability.
Declaration
Objective-C
- (void)setTextureScaleFactor:(CGFloat)value;
Swift
func setTextureScaleFactor(_ value: CGFloat)
-
Returns the cursor screen position in pixels.
Declaration
Objective-C
- (CGPoint)getCursorPosition;
Swift
func getCursorPosition() -> CGPoint
-
Set the cursor screen position.
Declaration
Objective-C
- (void)setCursorPosition:(CGPoint)point;
Swift
func setCursorPosition(_ point: CGPoint)
Parameters
point
The screen point in pixels.
-
Get the cursor WGS coordinates.
Declaration
Objective-C
- (nonnull CoordinatesObject *)getCursorWgsPosition;
Swift
func getCursorWgsPosition() -> CoordinatesObject
-
Retrieves the list of landmarks under the cursor location.
Declaration
Objective-C
- (nonnull NSArray<LandmarkObject *> *)getCursorSelectionLandmarks;
Swift
func getCursorSelectionLandmarks() -> [LandmarkObject]
-
Retrieves the list of streets under the cursor location.
Declaration
Objective-C
- (nonnull NSArray<LandmarkObject *> *)getCursorSelectionStreets;
Swift
func getCursorSelectionStreets() -> [LandmarkObject]
-
Retrieves the list of overlay items under the cursor location.
Declaration
Objective-C
- (nonnull NSArray<OverlayItemObject *> *)getCursorSelectionOverlayItems;
Swift
func getCursorSelectionOverlayItems() -> [OverlayItemObject]
-
Retrieves the list of traffic events under the cursor location.
Declaration
Objective-C
- (nonnull NSArray<TrafficEventObject *> *)getCursorSelectionTrafficEvents;
Swift
func getCursorSelectionTrafficEvents() -> [TrafficEventObject]
-
Retrieves the list of routes under the cursor location.
Declaration
Objective-C
- (nonnull NSArray<RouteObject *> *)getCursorSelectionRoutes;
Swift
func getCursorSelectionRoutes() -> [RouteObject]
-
Retrieves the set of landmarks on the specified coordinates.
Declaration
Objective-C
- (nonnull NSArray<LandmarkObject *> *)getNearestLocations: (nonnull CoordinatesObject *)location;
Swift
func getNearestLocations(_ location: CoordinatesObject) -> [LandmarkObject]
-
Returns the closest address landmark based on location.
Declaration
Objective-C
- (nullable LandmarkObject *)getClosestAddress: (nonnull CoordinatesObject *)location radius:(int)radius;
Swift
func getClosestAddress(_ location: CoordinatesObject, radius: Int32) -> LandmarkObject?
Parameters
location
The location.
radius
The radius in meters.
-
Show compass on the map.
Declaration
Objective-C
- (void)showCompass;
Swift
func showCompass()
-
Hide compass from the map.
Declaration
Objective-C
- (void)hideCompass;
Swift
func hideCompass()
-
Check if compass is visible.
Declaration
Objective-C
- (BOOL)isCompassHidden;
Swift
func isCompassHidden() -> Bool
-
Set compass day mode.
Declaration
Objective-C
- (void)setCompassDayMode;
Swift
func setCompassDayMode()
-
Set compass night mode.
Declaration
Objective-C
- (void)setCompassNightMode;
Swift
func setCompassNightMode()
-
Refresh compass image.
Declaration
Objective-C
- (void)refreshCompassImage;
Swift
func refreshCompassImage()
-
Set compass to follow user interface style light or dark.
Declaration
Objective-C
- (void)setCompassFollowUserInterfaceStyle:(BOOL)value;
Swift
func setCompassFollowUserInterfaceStyle(_ value: Bool)
-
Returns the compass image view.
Declaration
Objective-C
- (nonnull UIImageView *)getCompassImageView;
Swift
func getCompassImageView() -> UIImageView
-
Returns the compass image layout constraints array.
Declaration
Objective-C
- (nonnull NSArray<NSLayoutConstraint *> *)getCompassLayoutConstraints;
Swift
func getCompassLayoutConstraints() -> [NSLayoutConstraint]
-
Register tap compass completion handler.
Declaration
Objective-C
- (void)setTapCompassCompletionHandler: (nonnull void (^)(FollowPositionMapRotationMode))handler;
Swift
func setTapCompassCompletionHandler(_ handler: @escaping (FollowPositionMapRotationMode) -> Void)
-
Register map view render completion handler.
Declaration
Objective-C
- (void)setOnMapViewRendered: (nonnull void (^)(ViewDataTransitionStatus, ViewCameraTransitionStatus))handler;
Swift
func setOnMapViewRendered(_ handler: @escaping (ViewDataTransitionStatus, ViewCameraTransitionStatus) -> Void)
-
Deregister map view render completion handler.
Declaration
Objective-C
- (void)resetOnMapViewRenderedCompletion;
Swift
func resetOnMapViewRenderedCompletion()
-
Set compass image size.
Declaration
Objective-C
- (void)setCompassSize:(CGFloat)size;
Swift
func setCompassSize(_ size: CGFloat)
-
Set the map compass insets. By default, the compass constraints are set to top-right corner.
Declaration
Objective-C
- (void)setCompassInsets:(UIEdgeInsets)insets;
Swift
func setCompassInsets(_ insets: UIEdgeInsets)
-
Show map logo.
Declaration
Objective-C
- (void)showMapLogo;
Swift
func showMapLogo()
-
Hide map logo.
Declaration
Objective-C
- (void)hideMapLogo;
Swift
func hideMapLogo()
-
Start following the current position.
Declaration
Objective-C
- (void)startFollowingPositionWithAnimationDuration:(NSTimeInterval)duration zoomLevel:(int)level completionHandler: (nonnull void (^)(BOOL))handler;
Swift
func startFollowingPosition(withAnimationDuration duration: TimeInterval, zoomLevel level: Int32) async -> Bool
Parameters
duration
The fly animation duration in milliseconds. 0 means no animation.
level
Use -1 for automatic zoom. Bigger zoom factor means closer to the map.
handler
The block to execute asynchronously with the result.
-
Start following the current position.
Declaration
Objective-C
- (void)startFollowingPositionWithAnimationDuration:(NSTimeInterval)duration zoomLevel:(int)level viewAngle:(double)angle completionHandler: (nonnull void (^)(BOOL))handler;
Swift
func startFollowingPosition(withAnimationDuration duration: TimeInterval, zoomLevel level: Int32, viewAngle angle: Double) async -> Bool
Parameters
duration
The fly animation duration in milliseconds. 0 means no animation.
level
Use -1 for automatic zoom. Bigger zoom factor means closer to the map.
angle
The map view angle. Default is std::numeric_limits
::max() meaning use default specified. handler
The block to execute asynchronously with the result.
-
Stop following the current position.
Declaration
Objective-C
- (void)stopFollowingPosition;
Swift
func stopFollowingPosition()
-
Restore following position from a manually adjusted mode to default auto-zoom mode.
Declaration
Objective-C
- (void)restoreFollowingPositionWithAnimationDuration:(NSTimeInterval)duration completionHandler: (nonnull void (^)(BOOL))handler;
Swift
func restoreFollowingPosition(withAnimationDuration duration: TimeInterval) async -> Bool
Parameters
duration
The fly animation duration in milliseconds. 0 means no animation.
handler
The block to execute asynchronously with the result.
-
Retrieves the camera associated with this map view.
Declaration
Objective-C
- (nullable MapCameraObject *)getMapCamera;
Swift
func getMapCamera() -> MapCameraObject?
-
Stop following the current position.
Declaration
Objective-C
- (void)stopFollowingPositionWithRestoreCameraMode:(BOOL)restoreCameraMode;
Swift
func stopFollowingPosition(withRestoreCameraMode restoreCameraMode: Bool)
Parameters
restoreCameraMode
Restore camera zoom level and view angle from follow touch camera mode.
-
Returns true if following the current position mode.
Declaration
Objective-C
- (BOOL)isFollowingPosition;
Swift
func isFollowingPosition() -> Bool
-
Test if following the current position is modified by the touch handler.
Declaration
Objective-C
- (BOOL)isFollowingPositionTouchHandlerModified;
Swift
func isFollowingPositionTouchHandlerModified() -> Bool
-
Test if following the current position is in default auto-zoom mode.
Declaration
Objective-C
- (BOOL)isDefaultFollowingPosition;
Swift
func isDefaultFollowingPosition() -> Bool
-
Returns the zoom level.
Declaration
Objective-C
- (int)getZoomLevel;
Swift
func getZoomLevel() -> Int32
-
Returns the maximum zoom level.
Declaration
Objective-C
- (int)getMaxZoomLevel;
Swift
func getMaxZoomLevel() -> Int32
-
Set a new zoom level centered on the specified screen position.
Declaration
Objective-C
- (void)setZoomLevel:(int)level animationDuration:(NSTimeInterval)duration;
Swift
func setZoomLevel(_ level: Int32, animationDuration duration: TimeInterval)
Parameters
level
The zoom level.
duration
The fly animation duration in milliseconds. 0 means no animation.
-
Set a new zoom level centered on the specified screen position.
Declaration
Objective-C
- (void)setZoomLevel:(int)level point:(CGPoint)point animationDuration:(NSTimeInterval)duration;
Swift
func setZoomLevel(_ level: Int32, point: CGPoint, animationDuration duration: TimeInterval)
Parameters
level
The zoom level.
point
The screen point in pixels.
duration
The fly animation duration in milliseconds. 0 means no animation.
-
Set the configured max zoom level.
Declaration
Objective-C
- (void)setMaxZoomLevel:(int)level;
Swift
func setMaxZoomLevel(_ level: Int32)
-
Set the configured min zoom level.
Declaration
Objective-C
- (void)setMinZoomLevel:(int)level;
Swift
func setMinZoomLevel(_ level: Int32)
-
Returns the min zoom level.
Declaration
Objective-C
- (int)getMinZoomLevel;
Swift
func getMinZoomLevel() -> Int32
-
Set map details quality level. Default is MapDetailsQualityLevelHigh.
Declaration
Objective-C
- (void)setMapDetailsQualityLevel:(MapDetailsQualityLevel)level;
Swift
func setMapDetailsQualityLevel(_ level: MapDetailsQualityLevel)
Parameters
level
Map details quality level, see MapDetailsQualityLevel.
-
Returns the map details quality level.
Declaration
Objective-C
- (MapDetailsQualityLevel)getMapDetailsQualityLevel;
Swift
func getMapDetailsQualityLevel() -> MapDetailsQualityLevel
-
Set the viewing angle in degrees.
Declaration
Objective-C
- (void)setViewAngle:(double)value;
Swift
func setViewAngle(_ value: Double)
Parameters
value
The angle in degree.
-
Returns the viewing angle.
Declaration
Objective-C
- (double)getViewAngle;
Swift
func getViewAngle() -> Double
-
Set tilt angle in degrees.
Declaration
Objective-C
- (void)setTiltAngle:(double)angle;
Swift
func setTiltAngle(_ angle: Double)
Parameters
angle
The angle in degree.
-
Returns the tilt angle in degrees.
Declaration
Objective-C
- (double)getTiltAngle;
Swift
func getTiltAngle() -> Double
-
Returns the camera heading in degrees, with respect to Earth.
Declaration
Objective-C
- (double)getHeadingInDegrees;
Swift
func getHeadingInDegrees() -> Double
-
Returns the camera pitch in degrees, with respect to Earth.
Declaration
Objective-C
- (double)getPitchInDegrees;
Swift
func getPitchInDegrees() -> Double
-
Returns the map view current scale ( meters for 1 mm ).
Declaration
Objective-C
- (double)getMapScale;
Swift
func getMapScale() -> Double
-
Check if map view contains terrain topography information. @details The map view has terrain topography if the map style includes the terrain elevation layer and data is available on queried location
Declaration
Objective-C
- (BOOL)hasTerrainTopography;
Swift
func hasTerrainTopography() -> Bool
-
Set custom watermark texts to show on the map.
Declaration
Objective-C
- (void)setWatermarkText:(nonnull NSString *)line1 line2:(nonnull NSString *)line2;
Swift
func setWatermarkText(_ line1: String, line2: String)
Parameters
line1
The first line to show.
line2
The second line to show - this has a smaller font
-
Center the map.
Declaration
Objective-C
- (void)centerOnZoomLevel:(int)zoomLevel animationDuration:(NSTimeInterval)duration;
Swift
func center(onZoomLevel zoomLevel: Int32, animationDuration duration: TimeInterval)
Parameters
zoomLevel
Use -1 for automatic zoom. Bigger zoom factor means closer to the map.
duration
The fly animation duration in milliseconds. 0 means no animation.
-
Center the map on location.
Declaration
Objective-C
- (void)centerOnCoordinates:(nonnull CoordinatesObject *)location zoomLevel:(int)level animationDuration:(NSTimeInterval)duration;
Swift
func center(onCoordinates location: CoordinatesObject, zoomLevel level: Int32, animationDuration duration: TimeInterval)
Parameters
location
The location object.
level
Use -1 for automatic zoom. Bigger zoom factor means closer to the map.
duration
The fly animation duration in milliseconds. 0 means no animation.
-
Center the map on location.
Declaration
Objective-C
- (void)centerOnCoordinates:(nonnull CoordinatesObject *)location zoomLevel:(int)level mapAngle:(double)mapAngle viewAngle:(double)viewAngle animationDuration:(NSTimeInterval)duration;
Swift
func center(onCoordinates location: CoordinatesObject, zoomLevel level: Int32, mapAngle: Double, viewAngle: Double, animationDuration duration: TimeInterval)
Parameters
location
The location object.
level
Use -1 for automatic zoom. Bigger zoom factor means closer to the map.
mapAngle
Map rotation angle in the range [0.0, 360.0] degrees. (Use std::numeric_limits
::max() for automatic selection). viewAngle
Map view angle in the range [-90.0, 90.0] degrees. (Use std::numeric_limits
::max() for automatic selection). duration
The fly animation duration in milliseconds. 0 means no animation.
-
Center the map on location.
Declaration
Objective-C
- (void)centerOnCoordinates:(nonnull CoordinatesObject *)location zoomLevel:(int)level point:(CGPoint)point mapAngle:(double)mapAngle viewAngle:(double)viewAngle animationDuration:(NSTimeInterval)duration completionHandler:(nonnull void (^)(BOOL))handler;
Swift
func center(onCoordinates location: CoordinatesObject, zoomLevel level: Int32, point: CGPoint, mapAngle: Double, viewAngle: Double, animationDuration duration: TimeInterval) async -> Bool
Parameters
location
The location object.
level
Use -1 for automatic zoom. Bigger zoom factor means closer to the map.
point
Screen position in pixels where the coordinates should project ( default uses the specified cursor coordinates ).
mapAngle
Map rotation angle in the range [0.0, 360.0] degrees. (Use std::numeric_limits
::max() for automatic selection). viewAngle
Map view angle in the range [-90.0, 90.0] degrees. (Use std::numeric_limits
::max() for automatic selection). duration
The fly animation duration in milliseconds. 0 means no animation.
handler
The block to execute asynchronously with the result.
-
Center the map on location.
Declaration
Objective-C
- (void)centerOnCoordinates:(nonnull CoordinatesObject *)location zoomLevel:(int)level point:(CGPoint)point mapAngle:(double)mapAngle viewAngle:(double)viewAngle animationDuration:(NSTimeInterval)duration;
Swift
func center(onCoordinates location: CoordinatesObject, zoomLevel level: Int32, point: CGPoint, mapAngle: Double, viewAngle: Double, animationDuration duration: TimeInterval)
Parameters
location
The location object.
level
Use -1 for automatic zoom. Bigger zoom factor means closer to the map.
point
Screen position in pixels where the coordinates should project ( default uses the specified cursor coordinates ).
mapAngle
Map rotation angle in the range [0.0, 360.0] degrees. (Use std::numeric_limits
::max() for automatic selection). viewAngle
Map view angle in the range [-90.0, 90.0] degrees. (Use std::numeric_limits
::max() for automatic selection). duration
The fly animation duration in milliseconds. 0 means no animation.
-
Change the map view perspective.
Declaration
Objective-C
- (void)setPerspective:(MapViewPerspective)perspective animationDuration:(NSTimeInterval)duration completionHandler:(nonnull void (^)(BOOL))handler;
Swift
func setPerspective(_ perspective: MapViewPerspective, animationDuration duration: TimeInterval) async -> Bool
Parameters
perspective
The map perspective.
duration
The fly animation duration in milliseconds. 0 means no animation.
handler
The block to execute asynchronously with the result.
-
Get the map view perspective.
Declaration
Objective-C
- (MapViewPerspective)getPerspective;
Swift
func getPerspective() -> MapViewPerspective
-
Align the map north up.
Declaration
Objective-C
- (void)alignNorthUpWithAnimationDuration:(NSTimeInterval)duration completionHandler:(nonnull void (^)(BOOL))handler;
Swift
func alignNorthUp(withAnimationDuration duration: TimeInterval) async -> Bool
Parameters
duration
The fly animation duration in milliseconds. 0 means no animation.
handler
The block to execute asynchronously with the result.
-
Draw a marker collection on the map.
Declaration
Objective-C
- (void)addMarker:(nonnull MarkerCollectionObject *)markerCollection;
Swift
func addMarker(_ markerCollection: MarkerCollectionObject)
Parameters
markerCollection
The marker collection.
-
Draw a marker collection on the map with center layout animation.
Declaration
Objective-C
- (void)addMarker:(nonnull MarkerCollectionObject *)markerCollection animationDuration:(NSTimeInterval)duration;
Swift
func addMarker(_ markerCollection: MarkerCollectionObject, animationDuration duration: TimeInterval)
Parameters
markerCollection
The marker collection.
duration
The fly animation duration in milliseconds. 0 means no animation. -1, means without center on the area.
-
Draw a marker collection on the map with custom render settings.
Declaration
Objective-C
- (void)addMarker:(nonnull MarkerCollectionObject *)markerCollection renderSettings:(MarkerCollectionObjectRenderSettings)renderSettings;
Swift
func addMarker(_ markerCollection: MarkerCollectionObject, renderSettings: MarkerCollectionObjectRenderSettings)
Parameters
markerCollection
The marker collection.
renderSettings
The render settings.
-
Draw a marker collection on the map with custom render settings.
Declaration
Objective-C
- (void)addMarker:(nonnull MarkerCollectionObject *)markerCollection renderSettings:(MarkerCollectionObjectRenderSettings)renderSettings animationDuration:(NSTimeInterval)duration completionHandler:(nonnull void (^)(BOOL))handler;
Swift
func addMarker(_ markerCollection: MarkerCollectionObject, renderSettings: MarkerCollectionObjectRenderSettings, animationDuration duration: TimeInterval) async -> Bool
Parameters
markerCollection
The marker collection.
renderSettings
The render settings.
duration
The fly animation duration in milliseconds. 0 means no animation. -1, means without center on the area.
handler
The block to execute asynchronously with the result.
-
Remove the specified marker collection from the map.
Declaration
Objective-C
- (void)removeMarker:(nonnull MarkerCollectionObject *)markerCollection;
Swift
func removeMarker(_ markerCollection: MarkerCollectionObject)
Parameters
markerCollection
The marker collection.
-
Removes all the markers collection from the map.
Declaration
Objective-C
- (void)removeAllMarkers;
Swift
func removeAllMarkers()
-
Returns the available markers collection from the map.
Declaration
Objective-C
- (nonnull NSArray<MarkerCollectionObject *> *)getAvailableMarkers;
Swift
func getAvailableMarkers() -> [MarkerCollectionObject]
-
Returns the path collection from the map.
Declaration
Objective-C
- (nullable PathCollectionObject *)getPaths;
Swift
func getPaths() -> PathCollectionObject?
-
Removes all the paths collection from the map.
Declaration
Objective-C
- (void)removeAllPaths;
Swift
func removeAllPaths()
-
Apply the following map style to the map.
Declaration
Objective-C
- (void)applyStyleWithStyleIdentifier:(NSInteger)styleIdentifier smoothTransition:(BOOL)smoothTransition;
Swift
func applyStyle(withStyleIdentifier styleIdentifier: Int, smoothTransition: Bool)
Parameters
styleIdentifier
The map style identifier.
smoothTransition
Set true for a smooth transition between old and new style.
-
Apply the following map style to the map.
Declaration
Objective-C
- (void)applyStyleWithStyleBuffer:(nonnull NSData *)styleBuffer smoothTransition:(BOOL)smoothTransition;
Swift
func applyStyle(withStyleBuffer styleBuffer: Data, smoothTransition: Bool)
Parameters
styleBuffer
The map style data buffer.
smoothTransition
Set true for a smooth transition between old and new style.
-
Apply the following map style to the map.
Declaration
Objective-C
- (void)applyStyleWithFilePath:(nonnull NSString *)filePath smoothTransition:(BOOL)smooth;
Swift
func applyStyle(withFilePath filePath: String, smoothTransition smooth: Bool)
Parameters
filePath
The map style file path.
smoothTransition
Set true for a smooth transition between old and new style.
-
Returns the current map style identifier. @details If no style is yet set the function returns 0.
Declaration
Objective-C
- (NSInteger)getStyleIdentifier;
Swift
func getStyleIdentifier() -> Int
-
Start a search request for the given query using the map view center as the reference point.
Declaration
Objective-C
- (void)searchWithQuery:(nonnull NSString *)query completionHandler: (nonnull void (^)(NSArray<LandmarkObject *> *_Nonnull))handler;
Swift
func search(withQuery query: String) async -> [LandmarkObject]
Parameters
query
The query string.
handler
The block to execute asynchronously with the search results.
-
Start a nearby search request using the map view center as the reference point.
Declaration
Objective-C
- (void)searchAroundWithCompletionHandler: (nonnull void (^)(NSArray<LandmarkObject *> *_Nonnull))handler;
Swift
func searchAround() async -> [LandmarkObject]
Parameters
handler
The block to execute asynchronously with the search results.
-
Start a nearby search request using the map view center as the reference point.
Declaration
Objective-C
- (void)searchAroundWithCategory:(nonnull LandmarkCategoryObject *)category completionHandler: (nonnull void (^)(NSArray<LandmarkObject *> *_Nonnull)) handler;
Swift
func searchAround(withCategory category: LandmarkCategoryObject) async -> [LandmarkObject]
Parameters
category
The search category.
handler
The block to execute asynchronously with the search results.
-
Stop a search request.
Declaration
Objective-C
- (void)cancelSearch;
Swift
func cancelSearch()
-
Set the search max number of matches.
Declaration
Objective-C
- (void)setMaxMatches:(int)value;
Swift
func setMaxMatches(_ value: Int32)
-
If set to true, only an exact match of free text search is returned as result.
Declaration
Objective-C
- (void)setExactMatch:(BOOL)value;
Swift
func setExactMatch(_ value: Bool)
-
If set to true, search is perform through the addresses.
Declaration
Objective-C
- (void)setSearchAddresses:(BOOL)value;
Swift
func setSearchAddresses(_ value: Bool)
-
If set to true, search is perform through map POIs.
Declaration
Objective-C
- (void)setSearchMapPOIs:(BOOL)value;
Swift
func setSearchMapPOIs(_ value: Bool)
-
If set to true, search will be done using only onboard data.
Declaration
Objective-C
- (void)setSearchOnlyOnboard:(BOOL)value;
Swift
func setSearchOnlyOnboard(_ value: Bool)
-
Set the search threshold distance. @details This may be used to control the reverse geocoding and search along route lookup area.
Declaration
Objective-C
- (void)setThresholdDistance:(int)threshold;
Swift
func setThresholdDistance(_ threshold: Int32)
Parameters
threshold
The threshold value.
-
Set the search landmark category. Returns true if operation was successful.
Declaration
Objective-C
- (BOOL)setCategory:(nonnull LandmarkCategoryObject *)category;
Swift
func setCategory(_ category: LandmarkCategoryObject) -> Bool
Parameters
category
The landmark category object.
-
Enables and disables the inclusion of fuzzy search results.
Declaration
Objective-C
- (void)setAllowFuzzyResults:(BOOL)value;
Swift
func setAllowFuzzyResults(_ value: Bool)
-
Highlight on the map the given landmark.
Declaration
Objective-C
- (void)presentHighlights:(nonnull NSArray<LandmarkObject *> *)highlights settings:(nonnull HighlightRenderSettings *)settings;
Swift
func presentHighlights(_ highlights: [LandmarkObject], settings: HighlightRenderSettings)
Parameters
highlights
The landmarks array.
settings
The highlight render settings.
-
Highlight on the map the given landmark.
Declaration
Objective-C
- (void)presentHighlights:(nonnull NSArray<LandmarkObject *> *)highlights settings:(nonnull HighlightRenderSettings *)settings highlightId:(int)highlightId;
Swift
func presentHighlights(_ highlights: [LandmarkObject], settings: HighlightRenderSettings, highlightId: Int32)
Parameters
highlights
The landmarks array.
settings
The highlight render settings.
highlightId
The highlighted collection id. If already exist a highlighted collection with this id, it will be replaced. @details Highlighted collections will be displayed ordered ascending by the highlightId.
-
Highlight on the map the given landmarks and center on the area.
Declaration
Objective-C
- (void)presentHighlights:(nonnull NSArray<LandmarkObject *> *)highlights settings:(nonnull HighlightRenderSettings *)settings highlightId:(int)highlightId animationDuration:(NSTimeInterval)duration completionHandler:(nonnull void (^)(BOOL))handler;
Swift
func presentHighlights(_ highlights: [LandmarkObject], settings: HighlightRenderSettings, highlightId: Int32, animationDuration duration: TimeInterval) async -> Bool
Parameters
highlights
The landmarks array.
settings
The highlight render settings.
highlightId
The highlighted collection id. If already exist a highlighted collection with this id, it will be replaced.
duration
The center fly animation duration in milliseconds. 0, means no animation. -1, means without center on the area.
handler
The block to execute asynchronously with the result. @details Highlighted collections will be displayed ordered ascending by the highlightId. @details The edge area insets ( from setEdgeAreaInsets API ) is taking into consideration for centering.
-
Remove map highlights with id.
Declaration
Objective-C
- (void)removeHighlight:(int)highlightId;
Swift
func removeHighlight(_ highlightId: Int32)
Parameters
highlightId
The highlighted collection id.
-
Disable all highlights.
Declaration
Objective-C
- (void)removeHighlights;
Swift
func removeHighlights()
-
Returns the highlight geographic area.
Declaration
Objective-C
- (nullable RectangleGeographicAreaObject *)getHighlightArea;
Swift
func getHighlightArea() -> RectangleGeographicAreaObject?
-
Returns the highlight geographic area for the collection id.
Declaration
Objective-C
- (nullable RectangleGeographicAreaObject *)getHighlightArea:(int)highlightId;
Swift
func getHighlightArea(_ highlightId: Int32) -> RectangleGeographicAreaObject?
Parameters
highlightId
The highlighted collection id.
-
Returns the highlighted landmarks for the collection id.
Declaration
Objective-C
- (nonnull NSArray<LandmarkObject *> *)getHighlight:(int)highlightId;
Swift
func getHighlight(_ highlightId: Int32) -> [LandmarkObject]
Parameters
highlightId
The highlighted collection id.
-
Show routes on the map. The main route is considered the first route from the list.
Declaration
Objective-C
- (void)showRoutes:(nonnull NSArray<RouteObject *> *)routes withTraffic:(nullable TrafficContext *)traffic showSummary:(BOOL)summary;
Swift
func showRoutes(_ routes: [RouteObject], withTraffic traffic: TrafficContext?, showSummary summary: Bool)
Parameters
routes
The list of routes.
traffic
The traffic context, if available.
summary
Specify true for route summary to be visible.
-
Show better route on the map.
Declaration
Objective-C
- (void)showBetterRoute:(nonnull RouteObject *)route withTraffic:(nullable TrafficContext *)trafficContext timeGain:(NSUInteger)timeGain showSummary:(BOOL)summary;
Swift
func showBetterRoute(_ route: RouteObject, withTraffic trafficContext: TrafficContext?, timeGain: UInt, showSummary summary: Bool)
Parameters
route
The better route.
trafficContext
The traffic context, if available.
timeGain
The time gain in minutes.
summary
Specify true for route summary to be visible.
-
Present routes on the map with center layout animation. The main route is considered the first route from the list.
Declaration
Objective-C
- (void)presentRoutes:(nonnull NSArray<RouteObject *> *)routes withTraffic:(nullable TrafficContext *)traffic showSummary:(BOOL)summary animationDuration:(NSTimeInterval)duration;
Swift
func presentRoutes(_ routes: [RouteObject], withTraffic traffic: TrafficContext?, showSummary summary: Bool, animationDuration duration: TimeInterval)
Parameters
routes
The list of routes.
traffic
The traffic context, if available.
summary
Specify true for route summary to be visible.
duration
The fly animation duration in milliseconds. 0 means no animation.
-
Present routes on the map with center layout animation. The main route is considered the first route from the list.
Declaration
Objective-C
- (void)presentRoutes:(nonnull NSArray<RouteObject *> *)array withTraffic:(nullable TrafficContext *)trafficContext showSummary:(BOOL)summary displayMode:(RouteDisplayMode)mode animationDuration:(NSTimeInterval)duration completionHandler:(nonnull void (^)(BOOL))handler;
Swift
func presentRoutes(_ array: [RouteObject], withTraffic trafficContext: TrafficContext?, showSummary summary: Bool, displayMode mode: RouteDisplayMode, animationDuration duration: TimeInterval) async -> Bool
Parameters
routes
The list of routes.
traffic
The traffic context, if available.
summary
Specify true for route summary to be visible.
mode
The display mode.
duration
The fly animation duration in milliseconds. 0 means no animation.
handler
The block to execute asynchronously with the result.
-
Remove the summary label from the routes.
Declaration
Objective-C
- (void)hideSummaryFor:(nonnull NSArray<RouteObject *> *)routes;
Swift
func hideSummary(for routes: [RouteObject])
Parameters
routes
The list of routes.
-
Remove routes from the map.
Declaration
Objective-C
- (void)removeRoutes:(nonnull NSArray<RouteObject *> *)routes;
Swift
func removeRoutes(_ routes: [RouteObject])
Parameters
routes
The list of routes.
-
Returns the routes presented on the map view. The main route is the last route in the collection.
Declaration
Objective-C
- (nonnull NSArray<RouteObject *> *)getPresentedRoutes;
Swift
func getPresentedRoutes() -> [RouteObject]
-
Remove all map routes.
Declaration
Objective-C
- (void)removeAllRoutes;
Swift
func removeAllRoutes()
-
Center the map on the given routes collection.
Declaration
Objective-C
- (void)centerOnRoutes:(nonnull NSArray<RouteObject *> *)routes displayMode:(RouteDisplayMode)mode animationDuration:(NSTimeInterval)duration;
Swift
func center(onRoutes routes: [RouteObject], displayMode mode: RouteDisplayMode, animationDuration duration: TimeInterval)
Parameters
routes
The list of routes.
mode
The display mode.
duration
The fly animation duration in milliseconds. 0 means no animation. @details The edge area insets ( from setEdgeAreaInsets API ) is taking into consideration.
-
Center the map on the given routes collection.
Declaration
Objective-C
- (void)centerOnRoutes:(nonnull NSArray<RouteObject *> *)array displayMode:(RouteDisplayMode)mode animationDuration:(NSTimeInterval)duration completionHandler:(nonnull void (^)(BOOL))handler;
Swift
func center(onRoutes array: [RouteObject], displayMode mode: RouteDisplayMode, animationDuration duration: TimeInterval) async -> Bool
Parameters
routes
The list of routes.
mode
The display mode.
duration
The fly animation duration in milliseconds. 0 means no animation.
handler
The block to execute asynchronously with the result. @details The edge area insets ( from setEdgeAreaInsets API ) is taking into consideration.
-
Center the map on the given routes collection using rectangle.
Declaration
Objective-C
- (void)centerOnRoutes:(nonnull NSArray<RouteObject *> *)array displayMode:(RouteDisplayMode)mode rectangle:(CGRect)rect animationDuration:(NSTimeInterval)duration;
Swift
func center(onRoutes array: [RouteObject], displayMode mode: RouteDisplayMode, rectangle rect: CGRect, animationDuration duration: TimeInterval)
Parameters
routes
The list of routes.
mode
The display mode.
rect
The screen viewport rectangle where routes should be centered. The value must be in pixels. Leave empty to allow SDK to compute an optimal viewport
duration
The fly animation duration in milliseconds. 0 means no animation.
-
Center the map on the given routes collection using rectangle.
Declaration
Objective-C
- (void)centerOnRoutes:(nonnull NSArray<RouteObject *> *)array displayMode:(RouteDisplayMode)mode rectangle:(CGRect)rect animationDuration:(NSTimeInterval)duration completionHandler:(nonnull void (^)(BOOL))handler;
Swift
func center(onRoutes array: [RouteObject], displayMode mode: RouteDisplayMode, rectangle rect: CGRect, animationDuration duration: TimeInterval) async -> Bool
Parameters
routes
The list of routes.
mode
The display mode.
rect
The screen viewport rectangle where routes should be centered. The value must be in pixels. Leave empty to allow SDK to compute an optimal viewport
duration
The fly animation duration in milliseconds. 0 means no animation.
handler
The block to execute asynchronously with the result. @details The edge area insets ( from setEdgeAreaInsets API ) is taking into consideration.
-
Center the map on the given route parts. @details The zoom level is automatically selected so that the entire route part between start distance and end distance is visible on the map
Declaration
Objective-C
- (void)centerOnRoute:(nonnull RouteObject *)route startDist:(int)startDist endDist:(int)endDist rectangle:(CGRect)rect animationDuration:(NSTimeInterval)duration;
Swift
func center(onRoute route: RouteObject, startDist: Int32, endDist: Int32, rectangle rect: CGRect, animationDuration duration: TimeInterval)
Parameters
route
The route to be shown.
startDist
The start distance from route begin.
endDist
The end distance from route begin
rect
The screen viewport rectangle where routes should be centered. The value must be in pixels.
duration
The fly animation duration in milliseconds. 0 means no animation.
-
Set the edge area insets. The values must be in pixels.
Declaration
Objective-C
- (void)setEdgeAreaInsets:(UIEdgeInsets)insets;
Swift
func setEdgeAreaInsets(_ insets: UIEdgeInsets)
-
Set the edge area insets and also refresh routes center layout.
Declaration
Objective-C
- (void)refreshRoutesWithEdgeAreaInsets:(UIEdgeInsets)insets;
Swift
func refreshRoutes(withEdgeAreaInsets insets: UIEdgeInsets)
-
Set the route as main route.
Declaration
Objective-C
- (void)setMainRoute:(nonnull RouteObject *)route;
Swift
func setMainRoute(_ route: RouteObject)
Parameters
route
The main route.
-
Returns true if the route is the main route.
Declaration
Objective-C
- (BOOL)isMainRoute:(nonnull RouteObject *)route;
Swift
func isMainRoute(_ route: RouteObject) -> Bool
Parameters
route
The route.
-
Returns the main route, if available.
Declaration
Objective-C
- (nullable RouteObject *)getMainRoute;
Swift
func getMainRoute() -> RouteObject?
-
Center the map on the given route instruction.
Declaration
Objective-C
- (void)centerOnRouteInstruction: (nonnull RouteInstructionObject *)routeInstruction zoomLevel:(int)level animationDuration:(NSTimeInterval)duration;
Swift
func center(onRouteInstruction routeInstruction: RouteInstructionObject, zoomLevel level: Int32, animationDuration duration: TimeInterval)
Parameters
routeInstruction
The route instruction.
level
Use -1 for automatic zoom. Bigger zoom factor means closer to the map.
duration
The fly animation duration in milliseconds. 0 means no animation.
-
Center the map on the given route instruction.
Declaration
Objective-C
- (void)centerOnRouteInstruction: (nonnull RouteInstructionObject *)routeInstruction zoomLevel:(int)level animationDuration:(NSTimeInterval)duration completionHandler:(nonnull void (^)(BOOL))handler;
Swift
func center(onRouteInstruction routeInstruction: RouteInstructionObject, zoomLevel level: Int32, animationDuration duration: TimeInterval) async -> Bool
Parameters
routeInstruction
The route instruction.
level
Use -1 for automatic zoom. Bigger zoom factor means closer to the map.
duration
The fly animation duration in milliseconds. 0 means no animation.
handler
The block to execute asynchronously with the result.
-
Center the map on the given traffic event.
Declaration
Objective-C
- (void)centerOnRouteTrafficEvent: (nonnull RouteTrafficEventObject *)trafficEvent zoomLevel:(int)level animationDuration:(NSTimeInterval)duration;
Swift
func center(onRouteTrafficEvent trafficEvent: RouteTrafficEventObject, zoomLevel level: Int32, animationDuration duration: TimeInterval)
Parameters
trafficEvent
The route traffic event.
level
Use -1 for automatic zoom. Bigger zoom factor means closer to the map.
duration
The fly animation duration in milliseconds. 0 means no animation.
-
Center the map on the given traffic event.
Declaration
Objective-C
- (void)centerOnRouteTrafficEvent: (nonnull RouteTrafficEventObject *)trafficEvent zoomLevel:(int)level animationDuration:(NSTimeInterval)duration completionHandler:(nonnull void (^)(BOOL))handler;
Swift
func center(onRouteTrafficEvent trafficEvent: RouteTrafficEventObject, zoomLevel level: Int32, animationDuration duration: TimeInterval) async -> Bool
Parameters
trafficEvent
The route traffic event.
level
Use -1 for automatic zoom. Bigger zoom factor means closer to the map.
duration
The fly animation duration in milliseconds. 0 means no animation.
handler
The block to execute asynchronously with the result.
-
Center the map on the given rectangle geographic area.
Declaration
Objective-C
- (void)centerOnArea:(nonnull RectangleGeographicAreaObject *)area zoomLevel:(int)level animationDuration:(NSTimeInterval)duration;
Swift
func center(onArea area: RectangleGeographicAreaObject, zoomLevel level: Int32, animationDuration duration: TimeInterval)
Parameters
area
The geographic area.
level
Use -1 for automatic zoom. Bigger zoom factor means closer to the map.
duration
The fly animation duration in milliseconds. 0 means no animation.
-
Center the map on the given rectangle geographic area.
Declaration
Objective-C
- (void)centerOnArea:(nonnull RectangleGeographicAreaObject *)area zoomLevel:(int)level animationDuration:(NSTimeInterval)duration completionHandler:(nonnull void (^)(BOOL))handler;
Swift
func center(onArea area: RectangleGeographicAreaObject, zoomLevel level: Int32, animationDuration duration: TimeInterval) async -> Bool
Parameters
area
The geographic area.
level
Use -1 for automatic zoom. Bigger zoom factor means closer to the map.
duration
The fly animation duration in milliseconds. 0 means no animation.
handler
The block to execute asynchronously with the result.
-
Center the map on the given polygon geographic area.
Declaration
Objective-C
- (void)centerOnPolygonArea:(nonnull PolygonGeographicAreaObject *)area zoomLevel:(int)level animationDuration:(NSTimeInterval)duration completionHandler:(nonnull void (^)(BOOL))handler;
Swift
func center(onPolygonArea area: PolygonGeographicAreaObject, zoomLevel level: Int32, animationDuration duration: TimeInterval) async -> Bool
Parameters
area
The geographic area.
level
Use -1 for automatic zoom. Bigger zoom factor means closer to the map.
duration
The fly animation duration in milliseconds. 0 means no animation.
-
Center the map on the given geographic area.
Declaration
Objective-C
- (void)centerOnGeographicArea:(nonnull GeographicAreaObject *)area zoomLevel:(int)level animationDuration:(NSTimeInterval)duration completionHandler:(nonnull void (^)(BOOL))handler;
Swift
func center(onGeographicArea area: GeographicAreaObject, zoomLevel level: Int32, animationDuration duration: TimeInterval) async -> Bool
Parameters
area
The geographic area.
level
Use -1 for automatic zoom. Bigger zoom factor means closer to the map.
duration
The fly animation duration in milliseconds. 0 means no animation.
-
Center the map on the given landmark object.
Declaration
Objective-C
- (void)centerOnLocation:(nonnull LandmarkObject *)landmark rectangle:(CGRect)rect animationDuration:(NSTimeInterval)duration;
Swift
func center(onLocation landmark: LandmarkObject, rectangle rect: CGRect, animationDuration duration: TimeInterval)
Parameters
landmark
The landmark object.
rect
The screen viewport rectangle where the landmark should be centered. The value must be in pixels.
duration
The fly animation duration in milliseconds. 0 means no animation.
-
Scroll map view.
Declaration
Objective-C
- (void)scrollMap:(CGPoint)translation;
Swift
func scrollMap(_ translation: CGPoint)
Parameters
translation.x
Horizontal in screen units. @details A positive value will move the map to the screen right, a negative value will move the map to the screen left.
translation.y
Vertical in screen units. @details A positive value will move the map to the screen bottom, a negative value will move the map to the screen top.
-
Fling map view.
Declaration
Objective-C
- (void)flingMap:(CGPoint)velocity;
Swift
func flingMap(_ velocity: CGPoint)
Parameters
velocity.x
Horizontal velocity in screen units. @details A positive value will move the map to the screen right, a negative value will move the map to the screen left.
velocity.y
Vertical velocity in screen units. @details A positive value will move the map to the screen bottom, a negative value will move the map to the screen top.
-
Convert a screen coordinate to a World Geodetic System coordinate.
Declaration
Objective-C
- (nonnull CoordinatesObject *)transformScreenToWgs:(CGPoint)point;
Swift
func transformScreen(toWgs point: CGPoint) -> CoordinatesObject
Parameters
point
The screen point in pixels.
-
Convert a WGS84 coordinate to a screen coordinate.
Declaration
Objective-C
- (CGPoint)transformWgsToScreen:(nonnull CoordinatesObject *)location;
Swift
func transformWgs(toScreen location: CoordinatesObject) -> CGPoint
Parameters
location
The WGS coordinates.
Return Value
The screen coordinates relative to view parent screen.
-
Get altitude at the given coordinates.
Declaration
Objective-C
- (double)getAltitude:(nonnull CoordinatesObject *)location;
Swift
func getAltitude(_ location: CoordinatesObject) -> Double
Parameters
location
The WGS coordinates.
Return Value
Altitude as meters from sea level if capability exist, otherwise returns 0. @details Use hasTerrainTopography() to check if the map view has the capability to return an altitude at coordinates.
-
Convert a screen coordinate to a World Geodetic System coordinate.
Declaration
Objective-C
- (nonnull NSArray<RectangleGeographicAreaObject *> *)transformScreenRectToWgs: (CGRect)rect;
Swift
func transformScreenRect(toWgs rect: CGRect) -> [RectangleGeographicAreaObject]
Parameters
rect
The screen rectangle in pixels.
-
Get the clipped part of the given route as a pair ( startDistance, endDistance ).
Declaration
Objective-C
- (nonnull NSArray<NSNumber *> *)getVisibleRouteInterval: (nonnull RouteObject *)route rect:(CGRect)rect;
Swift
func getVisibleRouteInterval(_ route: RouteObject, rect: CGRect) -> [NSNumber]
Parameters
route
The target route.
rect
The clipping rectangle in screen coordinates. If no clip rectangle is given, the whole screen is used.
-
Set the GPS arrow focus position in “following position” mode.
Declaration
Objective-C
- (void)setFollowPositionCameraFocus:(CGPoint)point;
Swift
func setFollowPositionCameraFocus(_ point: CGPoint)
Parameters
point
The focus point between 0.0 and 1.0.
-
Returns the GPS arrow focus position in “following position” mode.
Declaration
Objective-C
- (CGPoint)getFollowPositionCameraFocus;
Swift
func getFollowPositionCameraFocus() -> CGPoint
-
Set the minimum allowed zoom level.
Declaration
Objective-C
- (void)setMinimumAllowedZoomLevel:(int)level;
Swift
func setMinimumAllowedZoomLevel(_ level: Int32)
-
Set the maximum allowed zoom level.
Declaration
Objective-C
- (void)setMaximumAllowedZoomLevel:(int)level;
Swift
func setMaximumAllowedZoomLevel(_ level: Int32)
-
Returns true if view camera is moving.
Declaration
Objective-C
- (BOOL)isCameraMoving;
Swift
func isCameraMoving() -> Bool
-
Set buildings visibility to the specified option.
Declaration
Objective-C
- (void)setBuildingsVisibility:(BuildingsVisibility)visibility;
Swift
func setBuildingsVisibility(_ visibility: BuildingsVisibility)
-
Show all the landmarks from all categories of the specified landmark store.
Declaration
Objective-C
- (void)showLandmarksFromAllCategories: (nonnull LandmarkStoreContext *)landmarkStore;
Swift
func showLandmarks(fromAllCategories landmarkStore: LandmarkStoreContext)
-
Hide all the landmarks from all categories of the specified landmark store.
Declaration
Objective-C
- (void)hideLandmarksFromAllCategories: (nonnull LandmarkStoreContext *)landmarkStore;
Swift
func hideLandmarks(fromAllCategories landmarkStore: LandmarkStoreContext)
-
Show all the landmarks from the specified landmark category and store.
Declaration
Objective-C
- (void)showLandmarksFromCategory: (nonnull LandmarkCategoryObject *)landmarkCategory context:(nonnull LandmarkStoreContext *)landmarkStore;
Swift
func showLandmarks(fromCategory landmarkCategory: LandmarkCategoryObject, context landmarkStore: LandmarkStoreContext)
-
Hide all the landmarks from the specified landmark category and store.
Declaration
Objective-C
- (void)hideLandmarksFromCategory: (nonnull LandmarkCategoryObject *)landmarkCategory context:(nonnull LandmarkStoreContext *)landmarkStore;
Swift
func hideLandmarks(fromCategory landmarkCategory: LandmarkCategoryObject, context landmarkStore: LandmarkStoreContext)
-
Check if the default position scene object is visible on the map view.
Declaration
Objective-C
- (BOOL)isDefaultPositionTrackerVisible;
Swift
func isDefaultPositionTrackerVisible() -> Bool
-
Check if the default position scene object is visible on the map view in the given rectangle.
Declaration
Objective-C
- (BOOL)isDefaultPositionTrackerVisible:(CGRect)rectangle;
Swift
func isDefaultPositionTrackerVisible(_ rectangle: CGRect) -> Bool
Parameters
rectangle
The rectangle in screen coordinates.
-
Set default position tracked object.
Declaration
Objective-C
- (void)setDefaultPositionTracker;
Swift
func setDefaultPositionTracker()
-
Set flat position tracked object.
Declaration
Objective-C
- (void)setFlatPositionTracker;
Swift
func setFlatPositionTracker()
-
Get position tracked object coordinates.
Declaration
Objective-C
- (nullable CoordinatesObject *)getPositionTrackerCoordinates;
Swift
func getPositionTrackerCoordinates() -> CoordinatesObject?
-
Set position tracked object coordinates.
Declaration
Objective-C
- (void)setPositionTrackerCoordinates:(nonnull CoordinatesObject *)coordinates;
Swift
func setPositionTrackerCoordinates(_ coordinates: CoordinatesObject)
-
Get position tracked object orientation camera angles.
Declaration
Objective-C
- (CameraOrientationAngles)getPositionTrackerOrientation;
Swift
func getPositionTrackerOrientation() -> CameraOrientationAngles
-
Set position tracked object orientation camera angles.
Declaration
Objective-C
- (void)setPositionTrackerOrientation:(CameraOrientationAngles)orientation;
Swift
func setPositionTrackerOrientation(_ orientation: CameraOrientationAngles)
-
Get position tracked object visibility.
Declaration
Objective-C
- (BOOL)getPositionTrackerVisibility;
Swift
func getPositionTrackerVisibility() -> Bool
-
Set position tracked object visibility.
Declaration
Objective-C
- (void)setPositionTrackerVisibility:(BOOL)state;
Swift
func setPositionTrackerVisibility(_ state: Bool)
-
Set position tracked object accuracy circle color.
Declaration
Objective-C
- (void)setPositionTrackerAccuracyCircleColor:(nonnull UIColor *)color;
Swift
func setPositionTrackerAccuracyCircleColor(_ color: UIColor)
-
Set position tracker scale factor.
Declaration
Objective-C
- (void)setPositionTrackerScaleFactor:(double)factor;
Swift
func setPositionTrackerScaleFactor(_ factor: Double)
-
Get position tracker scale factor.
Declaration
Objective-C
- (double)getPositionTrackerScaleFactor;
Swift
func getPositionTrackerScaleFactor() -> Double
-
Get position tracker max scale factor.
Declaration
Objective-C
- (double)getPositionTrackerMaxScaleFactor;
Swift
func getPositionTrackerMaxScaleFactor() -> Double
-
Get position tracker screen rectangle.
Declaration
Objective-C
- (CGRect)getPositionTrackerScreenRect;
Swift
func getPositionTrackerScreenRect() -> CGRect
-
Customize default position tracked object.
Declaration
Objective-C
- (void)customizePositionTracker:(nonnull NSData *)textureData;
Swift
func customizePositionTracker(_ textureData: Data)
Parameters
textureData
The texture input data.
-
Customize default position tracked object.
Declaration
Objective-C
- (void)customizePositionTracker:(nonnull NSData *)objData material:(nonnull NSData *)matData;
Swift
func customizePositionTracker(_ objData: Data, material matData: Data)
Parameters
objData
The object geometry input data.
matData
The object materials input data.
-
Customize default position tracked object.
Declaration
Objective-C
- (BOOL)customizePositionTrackerGlTF:(nonnull NSData *)data;
Swift
func customizePositionTrackerGlTF(_ data: Data) -> Bool
Parameters
data
The glTF input data.
-
Save default position tracked object state.
Declaration
Objective-C
- (nullable NSData *)saveStatePositionTracker;
Swift
func saveStatePositionTracker() -> Data?
Return Value
The data buffer containing the state.
-
Restore default position tracked object state.
Declaration
Objective-C
- (SDKErrorCode)restoreStatePositionTracker:(nonnull NSData *)data;
Swift
func restoreStatePositionTracker(_ data: Data) -> SDKErrorCode
Return Value
The operation code.
-
Get position tracker heading angle.
Declaration
Objective-C
- (double)getTrackingObjectHeading;
Swift
func getTrackingObjectHeading() -> Double
-
Get tracking object pitch angle.
Declaration
Objective-C
- (double)getTrackingObjectPitch;
Swift
func getTrackingObjectPitch() -> Double
-
Get tracking object distance to camera.
Declaration
Objective-C
- (double)getTrackingObjectDistance;
Swift
func getTrackingObjectDistance() -> Double
-
Get tracking object zoom factor.
Declaration
Objective-C
- (double)getTrackingObjectZoomFactor;
Swift
func getTrackingObjectZoomFactor() -> Double
-
Make edge area visible for debug purpose only.
Declaration
Objective-C
- (void)setDebugEdgeAreaVisible:(BOOL)state;
Swift
func setDebugEdgeAreaVisible(_ state: Bool)
-
Set the touch behaviour new state.
Declaration
Objective-C
- (void)setTouchViewBehaviour:(TouchViewBehaviour)behaviour completionHandler: (nullable void (^)(MarkerObject *_Nullable))handler;
Swift
func setTouchViewBehaviour(_ behaviour: TouchViewBehaviour) async -> MarkerObject?
-
Set the touch behaviour new state with completion handler notification.
Declaration
Objective-C
- (void)setTouchViewBehaviour:(TouchViewBehaviour)behaviour didStartTouchHandler: (nullable void (^)(MarkerCollectionObject *_Nullable)) startTouchHandler didFinishTouchHandler: (nullable void (^)(MarkerObject *_Nullable))finishTouchHandler;
Swift
func setTouchViewBehaviour(_ behaviour: TouchViewBehaviour, didStartTouchHandler startTouchHandler: ((MarkerCollectionObject?) -> Void)?, didFinishTouchHandler finishTouchHandler: ((MarkerObject?) -> Void)? = nil)
-
Set the touch behaviour new state with custom render settings.
Declaration
Objective-C
- (void) setTouchViewBehaviour:(TouchViewBehaviour)behaviour renderSettings:(MarkerCollectionObjectRenderSettings)renderSettings completionHandler:(nullable void (^)(MarkerObject *_Nullable))handler;
Swift
func setTouchViewBehaviour(_ behaviour: TouchViewBehaviour, renderSettings: MarkerCollectionObjectRenderSettings) async -> MarkerObject?
-
Get the touch behaviour state.
Declaration
Objective-C
- (TouchViewBehaviour)getTouchViewBehaviour;
Swift
func getTouchViewBehaviour() -> TouchViewBehaviour
-
Make a screen capture of the map.
Declaration
Objective-C
- (nullable UIImage *)snapshotImageWithSize:(CGSize)size captureRect:(CGRect)rect;
Swift
func snapshotImage(with size: CGSize, capture rect: CGRect) -> UIImage?
Parameters
size
The size in points of the returned image.
rect
The rectangle in points to capture. If (0, 0, 0, 0) is provided then the entire map screen is captured.
-
Generate new markers collection from route packed geometry. Old collection is removed.
Declaration
Objective-C
- (SDKErrorCode)generateRouteGeometry:(nonnull NSData *)data routeRenderSettings:(MarkerObjectRenderSettings)renderSettings connectionsRenderSettings: (MarkerObjectRenderSettings)connectionsSettings;
Swift
func generateRouteGeometry(_ data: Data, routeRenderSettings renderSettings: MarkerObjectRenderSettings, connectionsRenderSettings connectionsSettings: MarkerObjectRenderSettings) -> SDKErrorCode
Parameters
data
Route packed geometry buffer.
renderSettings
Route render settings.
connectionsSettings
Route connections render settings.
-
Remove markers collection for route packed geometry.
Declaration
Objective-C
- (void)removeRouteGeometry;
Swift
func removeRouteGeometry()
-
Generate new marker collection from route instruction packed geometry. Old collection is removed.
Declaration
Objective-C
- (SDKErrorCode)generateNavigationInstructionGeometry:(nonnull NSData *)data renderSettings: (MarkerObjectRenderSettings) renderSettings;
Swift
func generateNavigationInstructionGeometry(_ data: Data, renderSettings: MarkerObjectRenderSettings) -> SDKErrorCode
Parameters
data
Route instruction packed geometry buffer.
renderSettings
Route render settings.
-
Remove marker collection from route instruction packed geometry.
Declaration
Objective-C
- (void)removeNavigationInstructionGeometry;
Swift
func removeNavigationInstructionGeometry()
-
Split path loop. Debug purpose only.
Declaration
Objective-C
- (void)showSplitPathLoops:(nonnull PathObject *)pathObject splitOverGeometry:(BOOL)state;
Swift
func showSplitPathLoops(_ pathObject: PathObject, splitOverGeometry state: Bool)
-
Hide split path loop. Debug purpose only.
Declaration
Objective-C
- (void)hideSplitPathLoops;
Swift
func hideSplitPathLoops()