[osx] Map camera
Shared MGLMapCamera between iOS and OS X. Unfortunately -camera and -setCamera: implementations need to be copy-pasted for now.
This commit is contained in:
committed by
Minh Nguyễn
parent
3f2fae521c
commit
0fb2b855a4
@@ -23,6 +23,7 @@ typedef NS_OPTIONS(NSUInteger, MGLMapDebugMaskOptions) {
|
||||
};
|
||||
|
||||
@class MGLAnnotationImage;
|
||||
@class MGLMapCamera;
|
||||
|
||||
@protocol MGLAnnotation;
|
||||
@protocol MGLMapViewDelegate;
|
||||
@@ -223,6 +224,31 @@ IB_DESIGNABLE
|
||||
coordinate or zoom level. */
|
||||
- (void)setDirection:(CLLocationDirection)direction animated:(BOOL)animated;
|
||||
|
||||
/** A camera representing the current viewpoint of the map. */
|
||||
@property (nonatomic, copy) MGLMapCamera *camera;
|
||||
|
||||
/** Moves the viewpoint to a different location with respect to the map with an
|
||||
optional transition animation.
|
||||
|
||||
@param camera The new viewpoint.
|
||||
@param animated Specify `YES` if you want the map view to animate the change
|
||||
to the new viewpoint or `NO` if you want the map to display the new
|
||||
viewpoint immediately. */
|
||||
- (void)setCamera:(MGLMapCamera *)camera animated:(BOOL)animated;
|
||||
|
||||
/** Moves the viewpoint to a different location with respect to the map with an
|
||||
optional transition duration and timing function.
|
||||
|
||||
@param camera The new viewpoint.
|
||||
@param duration The amount of time, measured in seconds, that the transition
|
||||
animation should take. Specify `0` to jump to the new viewpoint
|
||||
instantaneously.
|
||||
@param function A timing function used for the animation. Set this parameter
|
||||
to `nil` for a transition that matches most system animations. If the
|
||||
duration is `0`, this parameter is ignored.
|
||||
@param completion The block to execute after the animation finishes. */
|
||||
- (void)setCamera:(MGLMapCamera *)camera withDuration:(NSTimeInterval)duration animationTimingFunction:(nullable CAMediaTimingFunction *)function completionHandler:(nullable void (^)(void))completion;
|
||||
|
||||
/** The geographic coordinate bounds visible in the receiver’s viewport.
|
||||
|
||||
Changing the value of this property updates the receiver immediately. If you
|
||||
|
||||
Reference in New Issue
Block a user