MMKNavigationLayer
- Summary
- Instance methods
- getViewWithRoute:
- selectRouteWithRoute:
- selectedRoute
- addRouteViewListenerWithRouteViewListener:
- removeRouteViewListenerWithRouteViewListener:
- selectRoadEventWithEventId:
- deselectRoadEvent
- selectRequestPointWithRequestPointIndex:
- deselectRequestPoint
- addRequestPointListenerWithRequestPointListener:
- removeRequestPointListenerWithRequestPointListener:
- addBalloonViewListenerWithBalloonListener:
- removeBalloonViewListenerWithBalloonListener:
- addListenerWithNavigationLayerListener:
- removeListenerWithNavigationLayerListener:
- addPlacemarkTapListenerWithRoadEventsListener:
- removePlacemarkTapListenerWithRoaadEventsListener:
- setRoadEventVisibleOnRouteWithTag:on:
- removeFromMap
- setShowBalloonsGeometryWithEnabled:
- refreshStyle
- is2DMode
- set2DModeWithEnabled:
- Properties
Warning
This feature is available in the NaviKit SDK version.
@interface MMKNavigationLayer : NSObject |
Summary
Instance methods
- (nullable MMKRouteView *)getViewWithRoute:(nonnull MMKDrivingRoute *)route; |
- (void)selectRouteWithRoute:(nullable MMKRouteView *)route; |
- (nullable MMKRouteView *)selectedRoute; |
-Â (void)addRouteViewListenerWithRouteViewListener: |
-Â (void)removeRouteViewListenerWithRouteViewListener: |
- (void)selectRoadEventWithEventId:(nonnull NSString *)eventId; |
-Â (void)deselectRoadEvent; |
-Â (void)selectRequestPointWithRequestPointIndex:(NSUInteger)requestPointIndex; |
-Â (void)deselectRequestPoint; |
-Â (void)addRequestPointListenerWithRequestPointListener: |
-Â (void)removeRequestPointListenerWithRequestPointListener: |
-Â (void)addBalloonViewListenerWithBalloonListener: |
-Â (void)removeBalloonViewListenerWithBalloonListener: |
-Â (void)addListenerWithNavigationLayerListener: |
-Â (void)removeListenerWithNavigationLayerListener: |
-Â (void)addPlacemarkTapListenerWithRoadEventsListener: |
-Â (void)removePlacemarkTapListenerWithRoaadEventsListener: |
-Â (void)setRoadEventVisibleOnRouteWithTag:(MMKRoadEventsEventTag)tag |
-Â (void)removeFromMap; |
-Â (void)setShowBalloonsGeometryWithEnabled:(BOOL)enabled; |
-Â (void)refreshStyle; |
-Â (BOOL)is2DMode; Disabled by default |
-Â (void)set2DModeWithEnabled:(BOOL)enabled; |
Properties
@property (nonatomic, readonly, nonnull) MMKNavigation *navigation; |
@property (nonatomic, readonly, nonnull) MMKCamera *camera; |
@property (nonatomic, readonly) MMKNavigationLayerMode mode; |
@property (nonatomic, readonly, nonnull) NSArray<MMKRouteView *> *routes; |
@property (nonatomic, assign, unsafe_unretained, readwrite, |
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isIsVisible) |
@property (nonatomic, readonly, getter=isValid) BOOL valid; |
Instance methods
getViewWithRoute:
- (nullable MMKRouteView *)getViewWithRoute:(nonnull MMKDrivingRoute *)route; |
Find appearance of route.
selectRouteWithRoute:
- (void)selectRouteWithRoute:(nullable MMKRouteView *)route; |
NavigationLayer will try to show as much info as possible about selected route. For example if road event placemarks from different routes overlap, road event from selected route will be displayed, conflict will be hidden. None or one route can be selected at the same time. Pass nil/null to unselect route. Can be used only if mode() == NavigationLayerMode.RouteSelection
selectedRoute
- (nullable MMKRouteView *)selectedRoute; |
addRouteViewListenerWithRouteViewListener:
-Â (void)addRouteViewListenerWithRouteViewListener: |
Add this listener if you wish to handle taps on routes.
The class does not retain the object in the 'routeViewListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
removeRouteViewListenerWithRouteViewListener:
-Â (void)removeRouteViewListenerWithRouteViewListener: |
selectRoadEventWithEventId:
- (void)selectRoadEventWithEventId:(nonnull NSString *)eventId; |
deselectRoadEvent
-Â (void)deselectRoadEvent; |
selectRequestPointWithRequestPointIndex:
-Â (void)selectRequestPointWithRequestPointIndex:(NSUInteger)requestPointIndex; |
Selects a request point with specified index. Only one point can be selected at a time. If some other point is selected already, it will be deselected.
deselectRequestPoint
-Â (void)deselectRequestPoint; |
Deselects selected request point if any.
addRequestPointListenerWithRequestPointListener:
-Â (void)addRequestPointListenerWithRequestPointListener: |
Add this listener if you wish to handle taps on request points.
The class does not retain the object in the 'requestPointListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
removeRequestPointListenerWithRequestPointListener:
-Â (void)removeRequestPointListenerWithRequestPointListener: |
addBalloonViewListenerWithBalloonListener:
-Â (void)addBalloonViewListenerWithBalloonListener: |
The class does not retain the object in the 'balloonListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
removeBalloonViewListenerWithBalloonListener:
-Â (void)removeBalloonViewListenerWithBalloonListener: |
addListenerWithNavigationLayerListener:
-Â (void)addListenerWithNavigationLayerListener: |
The class does not retain the object in the 'navigationLayerListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
removeListenerWithNavigationLayerListener:
-Â (void)removeListenerWithNavigationLayerListener: |
addPlacemarkTapListenerWithRoadEventsListener:
-Â (void)addPlacemarkTapListenerWithRoadEventsListener: |
The class does not retain the object in the 'roadEventsListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
removePlacemarkTapListenerWithRoaadEventsListener:
-Â (void)removePlacemarkTapListenerWithRoaadEventsListener: |
The class does not retain the object in the 'roaadEventsListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
setRoadEventVisibleOnRouteWithTag:on:
-Â (void)setRoadEventVisibleOnRouteWithTag:(MMKRoadEventsEventTag)tag |
Sets road events on route tag visibility. Setting local chats visibility will also set visibility for ordinary chats and vice versa. None are visible by default.
removeFromMap
-Â (void)removeFromMap; |
Removes layer from map. No further operations with layer should be performed.
setShowBalloonsGeometryWithEnabled:
-Â (void)setShowBalloonsGeometryWithEnabled:(BOOL)enabled; |
for debug usage only
refreshStyle
-Â (void)refreshStyle; |
Force refresh style for all navigation layer objects.
is2DMode
-Â (BOOL)is2DMode; |
When in 2D mode: - map is switched to 2D mode - 'Free' and 'Following' camera modes have zero tilt - tilt changing gestures are disabled
Disabled by default
set2DModeWithEnabled:
-Â (void)set2DModeWithEnabled:(BOOL)enabled; |
Properties
navigation
@property (nonatomic, readonly, nonnull) MMKNavigation *navigation; |
camera
@property (nonatomic, readonly, nonnull) MMKCamera *camera; |
mode
@property (nonatomic, readonly) MMKNavigationLayerMode mode; |
Current view mode
routes
@property (nonatomic, readonly, nonnull) NSArray<MMKRouteView *> *routes; |
Routes representation on the map.
showRequestPoints
@property (nonatomic, assign, unsafe_unretained, readwrite, |
Enabled by default.
isVisible
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isIsVisible) |
valid
@property (nonatomic, readonly, getter=isValid) BOOL valid; |
Tells if this object is valid or no. Any method called on an invalid object will throw an exception. The object becomes invalid only on UI thread, and only when its implementation depends on objects already destroyed by now. Please refer to general docs about the interface for details on its invalidation.