MMKCamera
@interface MMKCamera : NSObject |
Camera tracks location, user input and provide new CameraPosition for map.
Summary
Instance methods
- (void)addListenerWithCameraListener: |
- (void)removeListenerWithCameraListener: |
- (void)setAutoZoomWithEnabled:(BOOL)enabled |
- (void)setAutoRotationWithEnabled:(BOOL)enabled |
- (void)setFollowingModeZoomOffsetWithOffset:(float)offset |
- (void)setOverviewRectWithRect:(nullable MMKScreenRect *)rect |
- (void)setExtraOverviewPointsWithPoints:(nullable NSArray<MMKPoint *> *)points; |
- (MMKCameraMode)cameraMode; |
- (void)setCameraModeWithMode:(MMKCameraMode)mode |
Properties
@property (nonatomic, assign, unsafe_unretained, readwrite, |
@property (nonatomic, readonly, getter=isValid) BOOL valid; |
Instance methods
addListenerWithCameraListener:
- (void)addListenerWithCameraListener: |
The class does not retain the object in the 'cameraListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
removeListenerWithCameraListener:
- (void)removeListenerWithCameraListener: |
Undocumented
setAutoZoomWithEnabled:animation:
- (void)setAutoZoomWithEnabled:(BOOL)enabled |
Set autozoom in 'Following' camera mode. animation
parameter ignored if camera currently not in the 'Following' mode. Enabled by default.
setAutoRotationWithEnabled:animation:
- (void)setAutoRotationWithEnabled:(BOOL)enabled |
Set autorotation in 'Following' camera mode. animation
parameter ignored if camera currently not in the 'Following' mode. Enabled by default.
setFollowingModeZoomOffsetWithOffset:animation:
- (void)setFollowingModeZoomOffsetWithOffset:(float)offset |
Add offset
value to zoom in following mode. 0.0 by default.
setOverviewRectWithRect:animation:
- (void)setOverviewRectWithRect:(nullable MMKScreenRect *)rect |
Defines area, where all routes should be shown in 'Overview' mode. If overviewRect
is null, mapWindow.focusRect used.
setExtraOverviewPointsWithPoints:
- (void)setExtraOverviewPointsWithPoints:(nullable NSArray<MMKPoint *> *)points; |
Given points will be visible when camera switches to 'Overview' mode. It is useful when you draw some extra info on the map out of routes.
cameraMode
- (MMKCameraMode)cameraMode; |
Undocumented
setCameraModeWithMode:animation:
- (void)setCameraModeWithMode:(MMKCameraMode)mode |
Undocumented
Properties
switchModesAutomatically
@property (nonatomic, assign, unsafe_unretained, readwrite, |
If enabled, camera will automatically switch between modes:
- Camera will become into 'Following' mode if current route in navigation selected or current speed is greater than: 10 km/h for auto and 5 km/h for pedestrian navigations.
- Camera will become into 'Following' mode from 'Overview' mode on guidance start.
- Camera will become into 'Overview' when routes requested, but current route does not selected yet.
- Camera will become into 'Free' mode from 'Following' mode on any external move (gesture / call
map.move
) - Camera will become into 'Following' mode from 'Free' mode if requirements from (1) satisfied and there are no any camera moving activity for 10 seconds
Enabled by default.
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.