aboutsummaryrefslogtreecommitdiff
path: root/iosApp/WhirlyGlobeMaplyComponent.xcframework/ios-arm64/WhirlyGlobeMaplyComponent.framework/Headers/MaplyViewController.h
blob: fc5b2eb575dab4fa09679825f56df3ab0aa00727 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
/*  MaplyViewController.h
 *  MaplyComponent
 *
 *  Created by Steve Gifford on 9/6/12.
 *  Copyright 2012-2022 mousebird consulting
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

#import <UIKit/UIKit.h>
#import <WhirlyGlobeMaplyComponent/MaplyCoordinate.h>
#import <WhirlyGlobeMaplyComponent/MaplyScreenMarker.h>
#import <WhirlyGlobeMaplyComponent/MaplyVectorObject.h>
#import <WhirlyGlobeMaplyComponent/MaplyViewTracker.h>
#import <WhirlyGlobeMaplyComponent/MaplyComponentObject.h>
#import <WhirlyGlobeMaplyComponent/MaplySharedAttributes.h>
#import <WhirlyGlobeMaplyComponent/MaplyBaseViewController.h>

@class MaplyControllerLayer;
@class MaplyViewController;


/** 
    Animation State used by the MaplyViewControllerAnimationDelegate.
 
    You fill out one of these when you're implementing the animation delegate.  Return it and the view controller will set the respective values to match.
 */
@interface MaplyViewControllerAnimationState : NSObject

/// Heading is calculated from due north
/// If not set or set to MAXFLOAT, this is ignored
@property (nonatomic) double heading;

/// Height above the map
@property (nonatomic) double height;

/// Position to move to on the map
@property (nonatomic) MaplyCoordinateD pos;

/// If set, this is a point on the screen where pos should be.
/// By default this is (-1,-1) meaning the screen position is just the middle.  Otherwise, this is where the position should wind up on the screen, if it can.
@property (nonatomic) CGPoint screenPos;

/** 
    Interpolate a new state between the given states A and B.
 
    This does a simple interpolation (lat/lon, not great circle) between the two animation states.
 */
+ (nonnull MaplyViewControllerAnimationState *)Interpolate:(double)t from:(MaplyViewControllerAnimationState *__nonnull)stateA to:(MaplyViewControllerAnimationState *__nonnull)stateB;

@end

/** 
    An animation delegate that can be set on a MaplyViewController to control the view over time.
 
    Filling out these methods will get you animation callbacks at the proper time to control position, heading and height on a frame basis.
 
    You pass the resulting object in to
 */
@protocol MaplyViewControllerAnimationDelegate <NSObject>

/** 
    This method is called when the animation starts.
 
    At the animation start we collect up the various parameters of the current visual view state and pas them in via the startState.  You probably want to keep track of this for later.
 
    @param viewC The view controller doing the animation.
 
    @param startState The starting point for the visual view animation.  Cache this somewhere for your own interpolation.
 
    @param startTime When the animation starts (e.g. now)
 
    @param endTime When the animation ends.  This is an absolute value.
 */
- (void)mapViewController:(MaplyViewController *__nonnull)viewC startState:(MaplyViewControllerAnimationState *__nonnull)startState startTime:(NSTimeInterval)startTime endTime:(NSTimeInterval)endTime;

/** 
    This method is called at the beginning of every frame draw to position the viewer.
 
    This is the method that does all the work.  You need to fill out the returned MaplyViewControllerAnimationState according to whatever interpolation your'e doing based on the currentTime.
 
    @param viewC The view controller doing the animation.
 
    @param currentTime The time for this frame.  Use this rather than calculating the time yourself.
 
    @return The MaplyViewControllerAnimationState expressing where you want the viewer to be and where they are looking.
 */
- (nonnull MaplyViewControllerAnimationState *)mapViewController:(MaplyViewController *__nonnull)viewC stateForTime:(NSTimeInterval)currentTime;

@optional

/** 
    This method is called at the end of the animation.
 
    The map view controller calls this method when the animation is finished.  Do your cleanup here if need be.
 
    @param viewC The map view controller.
 */
- (void)mapViewControllerDidFinishAnimation:(MaplyViewController *__nonnull)viewC;

@end

/** 
    A simple animation delegate for moving the map around.
 
    The animation delegate support provides a lot of flexibility.  This version just provides all the standard fields and interpolates from beginning to end.
 */
@interface MaplyViewControllerSimpleAnimationDelegate : NSObject <MaplyViewControllerAnimationDelegate>

/// Initialize with an animation state to copy
- (nonnull instancetype)initWithState:(MaplyViewControllerAnimationState *__nonnull)endState;

/// Location at the end of the animation
@property (nonatomic) MaplyCoordinateD loc;

/// Heading at the end of the animation
@property (nonatomic) double heading;

/// Height at the end of the animation
@property (nonatomic) double height;

/// Custom easing
@property (readwrite,copy) ZoomEasingBlock _Nullable zoomEasing;

@end

/** 
    A protocol to fill out for selection and tap messages from the MaplyViewController.
    
    Fill out the protocol when you want to get back selection and tap messages.  All the methods are optional.
  */
@protocol MaplyViewControllerDelegate <NSObject>

@optional

/** 
    Called when the user taps on or near an object.
    
    You're given the object you passed in originally, such as a MaplyScreenMarker.  You can set a userObject on most of these to put your own data in there for tracking.
  */
- (void)maplyViewController:(MaplyViewController *__nonnull)viewC didSelect:(NSObject *__nonnull)selectedObj;

/** 
    User selected a given object and tapped at a given location.
    
    This is called when the user selects an object.  It differs from maplyViewController:didSelect: in that it passes on the location (in the local coordinate system) and the position on screen.
    
    @param viewC View Controller that saw the selection.
    
    @param selectedObj The object selected.  Probably one of MaplyVectorObject or MaplyScreenLabel or so on.
    
    @param coord Location in the local coordinate system where the user tapped.
    
    @param screenPt Location on screen where the user tapped.
 */
- (void)maplyViewController:(MaplyViewController *__nonnull)viewC didSelect:(NSObject *__nonnull)selectedObj atLoc:(MaplyCoordinate)coord onScreen:(CGPoint)screenPt;

/** 
    User selected one or more objects at a given location.
    
    @param viewC View Controller that saw the selection(s).
    
    @param selectedObjs The object(s) selected.  Probably one of MaplyVectorObject or MaplyScreenLabel or so on.
    
    @param coord Location in the local coordinate system where the user tapped.
    
    @param screenPt Location on screen where the user tapped.
  */
- (void)maplyViewController:(MaplyViewController *__nonnull)viewC allSelect:(NSArray *__nonnull)selectedObjs atLoc:(MaplyCoordinate)coord onScreen:(CGPoint)screenPt;

/** 
    User tapped at a given location.
    
    This is a tap at a specific location on the map.  This won't be called if they tapped and selected, just for taps.
  */
- (void)maplyViewController:(MaplyViewController *__nonnull)viewC didTapAt:(MaplyCoordinate)coord;

/** 
    Called when the map starts moving.
 
    @param viewC The map view controller.
 
    @param userMotion Set if this is motion being caused by the user, rather than a call to set location.
 
    This is called when something (probably the user) starts moving the map.
 */
- (void)maplyViewControllerDidStartMoving:(MaplyViewController *__nonnull)viewC userMotion:(bool)userMotion;

/** 
    Called when the map stops moving.
 
    This is called when the map stops moving.  It passes in the corners of the current viewspace.
 
    @param viewC The globe view controller.
 
    @param userMotion Set if this is motion being caused by the user, rather than a call to set location.
 
    @param corners An array of length 4 containing the corners of the view space (lower left, lower right, upper right, upper left).  If any of those corners does not intersect the map (think zoomed out), its values are set to MAXFLOAT.
 */
- (void)maplyViewController:(MaplyViewController *__nonnull)viewC didStopMoving:(MaplyCoordinate *__nonnull)corners userMotion:(bool)userMotion;

/** 
    Called whenever the viewpoint moves.
 
    This is called whenever the viewpoint moves.  That includes user motion as well as animations.
 
    It may be triggered as often as every frame.  If that's a problem, use one of the other variants.
 
    @param viewC The map view controller.
 
    @param corners An array of length 4 containing the corners of the view space (lower left, lower right, upper right, upper left).  If any of those corners does not intersect the globe (think zoomed out), its values are set to MAXFLOAT.
 */
- (void)maplyViewController:(MaplyViewController *__nonnull)viewC didMove:(MaplyCoordinate *__nonnull)corners;


/** 
    Called when the user taps on one of your annotations.
    
    This is called when the user taps on an annotation.
    
    @param annotation Which annotation they tapped on.
  */
- (void)maplyViewController:(MaplyViewController *__nonnull)viewC didTapAnnotation:(MaplyAnnotation*__nonnull)annotation;

/// Old version for compatibility.  Use tap instead.
- (void)maplyViewController:(MaplyViewController *__nonnull)viewC didClickAnnotation:(MaplyAnnotation*__nonnull)annotation __deprecated;

@end


typedef NS_ENUM(NSInteger, MaplyMapType) {
	MaplyMapType3D,
	MaplyMapTypeFlat,
};

/** 
    This view controller implements a map.
    
    This is the main entry point for displaying a 2D or 3D map.  Create one of these, fill it with data and let your users mess around with it.
    
    You can display a variety of features on the map, including tile base maps (MaplyQuadImageTilesLayer), vectors (MaplyVectorObject), shapes (MaplyShape), and others.  Check out the add calls in the MaplyBaseViewController for details.
    
    The Maply View Controller can be initialized in 3D map, 2D map mode.  The 2D mode can be tethered to a UIScrollView if you want to handle gestures that way.  That mode is very specific at the moment.
    
    To get selection and tap callbacks, fill out the MaplyViewControllerDelegate and assign the delegate.
    
    Most of the functionality is shared with MaplyBaseViewController.  Be sure to look in there first.
  */
@interface MaplyViewController : MaplyBaseViewController

/// Initialize as a flat or 3D map.
- (nonnull instancetype)initWithMapType:(MaplyMapType)mapType;

/// Initialize as a 2D map.
- (nonnull instancetype)init;

/// Set the coordinate system to use in display.
/// The coordinate system needs to be valid in flat mode.  The extents, if present, will be used to define the coordinate system origin.
/// nil is the default and will result in a full web style Spherical Mercator.
@property(nonatomic,strong) MaplyCoordinateSystem *__nullable coordSys;

/** 
    Set the center of the display coordinate system.
    
    This is (0,0,0) by default.  If you set it to something else all display coordinates will be offset from that origin.
    
    The option is useful when displaying small maps (of a city, say) at very high resolution.
  */
@property(nonatomic) MaplyCoordinate3d displayCenter;

/** 
    Turn the pinch (zoom) gesture recognizer on and off
    
    On by default.
  */
@property(nonatomic,assign) bool pinchGesture;

/** 
    Turn the rotate gesture recognizer on and off
    
    On by default.
 */
@property(nonatomic,assign) bool rotateGesture;

/** 
    Turn the pan gesture on and off
    
    Pan gesture is on by default
  */
@property(nonatomic,assign) bool panGesture;

/** 
    Turn the double tap to zoom gesture recognizer on and off
    
    On by default.
 */
@property(nonatomic,assign) bool doubleTapZoomGesture;

/** 
    Turn the 2 finger tap to zoom out gesture recognizer on and off
    
    On by default.
 */
@property(nonatomic,assign) bool twoFingerTapGesture;

/** 
    Turn on the double tap and drag gesture to zoom in and out.
    
    On by default.
  */
@property(nonatomic,assign) bool doubleTapDragGesture;

/** 
    If set, we use a modified pan gesture recognizer to play nice
 with the scroll view.  For the UIScrollView object, set clipsToBounds,
 pagingEnabled, and delaysContentTouches to YES, and set scrollEnabled
 and canCancelContentTouches to NO.  Add swipe gesture recognizers
 to the scroll view to control paging, and call
 requirePanGestureRecognizerToFailForGesture: for each.
 
    Off by default.
 */
@property(nonatomic,assign) bool inScrollView;

/** 
    turn the touch to cancel animation gesture on and off
    
    off by default
 */
@property(nonatomic,assign) bool cancelAnimationOnTouch;

/** 
    The current rotation away from north.
 */
@property(nonatomic,assign) float heading;

/**
    The minimum angle, in degrees, which a rotate gesture must subtend before rotation begins.
        i.e., larger values are "stickier"
        default is zero, causing rotation to begin immediately
 */
@property(nonatomic,assign) float rotateGestureThreshold;

/** 
    If set, we'll automatically move to wherever the user tapped.
    
    When on we'll move the current location to wherever the user tapped if they tapped the globe.  That's true for selection as well.  On by default.
 */
@property(nonatomic,assign) bool autoMoveToTap;

/** 
    Delegate for selection and location tapping.
    
    Fill in the MaplyViewControllerDelegate and assign it here to get callbacks for object selection and tapping.
  */
@property(nonatomic,weak) NSObject<MaplyViewControllerDelegate> *__nullable delegate;

/** 
    Current height above terrain.
    
    In 3D map mode this is the height from which the user is viewing the map.  Maps are usually -PI to +PI along their horizontal edges.
  */
@property (nonatomic,assign) float height;

/** 
    2D visual views can do some simple wrapping.  This turns that on and off (off by default).
    
    On some 2D visual views we're allowed to wrap across the edge of the world.  This will attempt to do that.
  */
@property (nonatomic,assign) bool viewWrap;

/** 
    The box the view point can be in.
 
    This is the box the view point is allowed to be within.  The view controller will constrain it to be within that box.  Coordinates are in geographic (radians).
 */
- (MaplyBoundingBox)getViewExtents;

/** 
    The box the view point can be in.
    
    This is the box the view point is allowed to be within.  The view controller will constrain it to be within that box.  Coordinates are in geographic (radians).
  */
- (void)getViewExtentsLL:(MaplyCoordinate *__nonnull)ll ur:(MaplyCoordinate *__nonnull)ur;

/** 
    The box the view point can be in.
 
    This is the box the view point is allowed to be within.  The view controller will constrain it to be within that box. Coordinates are in geographic (radians).
 */
- (void)setViewExtents:(MaplyBoundingBox)box;

/** 
    The box the view point can be in.
    
    This is the box the view point is allowed to be within.  The view controller will constrain it to be within that box. Coordinates are in geographic (radians).
 */
- (void)setViewExtentsLL:(MaplyCoordinate)ll ur:(MaplyCoordinate)ur;

/** 
    Animate to the given position over time.
    
    @param newPos A coordinate in geographic (lon/lat radians)
    
    @param howLong A time in seconds.
  */
- (void)animateToPosition:(MaplyCoordinate)newPos time:(NSTimeInterval)howLong;

/** 
    Animate the given position to the screen position over time.
    
    This is similar to animateToPosition:time: except that it will attempt to match up the screen position and the geographic position.  This is how you offset the location you're looking at.
    
    If it's impossible to move newPos to loc, then nothing happens.
    
    @param newPos The geographic position (lon/lat in radians) to move to.
    
    @param loc The location on the screen where we'd like it to go.
    
    @param howLong How long in seconds to take getting there.
  */
- (bool)animateToPosition:(MaplyCoordinate)newPos onScreen:(CGPoint)loc time:(NSTimeInterval)howLong;

/** 
    Animate the given position and height to the screen position over time.
 
    This is similar to animateToPosition:time: but it also takes a height paramater
 
    @param newPos The geographic position (lon/lat in radians) to move to.
 
    @param newHeight  the view point height above the map.
 
    @param howLong How long in seconds to take getting there.
 */
- (void)animateToPosition:(MaplyCoordinate)newPos height:(float)newHeight time:(NSTimeInterval)howLong;

/** 
    Animate to the given position, heading and height over time.
 
    @param newPos A coordinate in geographic (lon/lat radians)
 
    @param newHeight New height to animate to.
 
    @param newHeading New heading to finish on.
 
    @param howLong A time interval in seconds.
 */
- (bool)animateToPosition:(MaplyCoordinate)newPos height:(float)newHeight heading:(float)newHeading time:(NSTimeInterval)howLong;

/** 
    Animate to the given position, heading and height over time.
 
    @param newPos A coordinate in geographic (lon/lat radians) (double precision)
 
    @param newHeight New height to animate to. (double)
 
    @param newHeading New heading to finish on. (double)
 
    @param howLong A time interval in seconds.
 */
- (bool)animateToPositionD:(MaplyCoordinateD)newPos height:(double)newHeight heading:(double)newHeading time:(NSTimeInterval)howLong;

/** 
    Animate to the given position, screen position, heading and height over time.
 
    If it's impossible to move newPos to loc, then nothing happens.
 
    @param newPos A coordinate in geographic (lon/lat radians)
 
    @param loc The location on the screen where we'd like it to go.
 
    @param newHeight New height to animate to.
 
    @param newHeading New heading to finish on.
 
    @param howLong A time interval in seconds.
 */
- (bool)animateToPosition:(MaplyCoordinate)newPos onScreen:(CGPoint)loc height:(float)newHeight heading:(float)newHeading time:(NSTimeInterval)howLong;

/** 
    Set the center of the screen to the given position immediately.
    
    @param newPos The geographic position (lon/lat in radians) to move to.
  */
- (void)setPosition:(MaplyCoordinate)newPos;

/** 
    Set the center of the screen and the height offset immediately.
    
    @param newPos The geographic position (lon/lat in radians) to move to.
    
    @param height Height the view point above the map.
  */
- (void)setPosition:(MaplyCoordinate)newPos height:(float)height;

/** 
    Return the current center position
 */
- (MaplyCoordinate)getPosition;

/** 
    Return the current view point's height above the map.
 */
- (float)getHeight;

/** 
    Return the current center position and height.
    
    @param pos The center of the screen in geographic (lon/lat in radians).
    
    @param height The current view point's height above the map.
  */
- (void)getPosition:(MaplyCoordinate *__nonnull)pos height:(float *__nonnull)height;


/** 
    Set the viewing state all at once
 
    This sets the position, height, screen position and heading all at once.
 */
- (void)setViewState:(MaplyViewControllerAnimationState *__nonnull)viewState;

/** 
    Make a MaplyViewControllerAnimationState object from the current view state.
 
    This returns the current view parameters in a single MaplyViewControllerAnimationState.
 */
- (nullable MaplyViewControllerAnimationState *)getViewState;

/** 
    Return the closest a viewer is allowed to get to the map surface.
 
    @return FLT_MIN if there's no pitchDelegate set
 */
- (float)getMinZoom;

/** 
    Return the farthest away a viewer is allowed to get from the map surface
 
    @return FLT_MIN if there's no pitchDelegate set
 */
- (float)getMaxZoom;

/** 
    Return the zoom limits for 3D map mode.
    
    @param minHeight The closest a viewer is allowed to get to the map surface.
    
    @param maxHeight The farthest away a viewer is allowed to get from the map surface.
  */
- (void)getZoomLimitsMin:(float *__nonnull)minHeight max:(float *__nonnull)maxHeight;

/** 
    Set the zoom limits for 3D map mode.
    
    @param minHeight The closest a viewer is allowed to get to the map surface.
    
    @param maxHeight The farthest away a viewer is allowed to get from the map surface.
 */
- (void)setZoomLimitsMin:(float)minHeight max:(float)maxHeight;

/** 
    Return the geographic (lon/lat radians) coordinate in radians for a given screen point.
    
    @return Returns the geo coordinate corresponding to a given screen point in radians.
 */
- (MaplyCoordinate)geoFromScreenPoint:(CGPoint)point;

/** 
    Find a height that shows the given bounding box.
    
    This method will search for a height that shows the given bounding box within the view.  The search is inefficient, so don't call this a lot.
    
    @param bbox The bounding box (in radians) we're trying to view.
    
    @param pos Where the view will be looking.
  */
- (float)findHeightToViewBounds:(MaplyBoundingBox)bbox
                            pos:(MaplyCoordinate)pos;

/** 
    Find a height that shows the given bounding box.
    This method will search for a height that shows the given bounding box within the view.  The search is inefficient, so don't call this a lot.

    This version takes a margin to add around the outside of the area.  Positive margins increase the screen area considered, making the
    given area larger.  Negative margins make the specified area smaller.
 
    @param bbox The bounding box (in radians) we're trying to view.
    @param pos Where the view will be looking.
    @param marginX Horizontal boundary around the area
    @param marginY Vertical boundary around the area
 */
- (float)findHeightToViewBounds:(MaplyBoundingBox)bbox
                            pos:(MaplyCoordinate)pos
                        marginX:(double)marginX
                        marginY:(double)marginY;

/**
    Find a height that shows the given bounding box.
    This method will search for a height that shows the given bounding box within the view.  The search is inefficient, so don't call this a lot.

    This version takes a margin to add around the outside of the area.  Positive margins increase the screen area considered, making the
    given area larger.  Negative margins make the specified area smaller.

    This version attempts to place the given bounds within a rectangle other than the whole view frame.

    @param bbox The bounding box (in radians) we're trying to view.
    @param pos Where the view will be looking.
    @param frame The screen area to consider.
    @param newPos (out,optional) The center location needed to place \c pos at the center of \c frame
    @param marginX Horizontal boundary around the area
    @param marginY Vertical boundary around the area
 */
- (float)findHeightToViewBounds:(MaplyBoundingBox)bbox
                            pos:(MaplyCoordinate)pos
                          frame:(CGRect)frame
                         newPos:(MaplyCoordinate *_Nullable)newPos
                        marginX:(double)marginX
                        marginY:(double)marginY;

/**
 
    Return the extents of the current view
 
    @return Returns the Bounding Box (in radians) corresponding to the current view
 */
- (MaplyBoundingBox)getCurrentExtents;

/**
 
    Make a gesture recognizer's success depend on the pan gesture
 recognizer's failure.
 
    When using the map view within a scroll view, add swipe gesture
 recognizers to the scroll view to control paging, and call this method
 for each.  See also the inScrollView property and its comment.
 
    @param other The other, subordinate gesture recognizer.
 */
- (void)requirePanGestureRecognizerToFailForGesture:(UIGestureRecognizer *__nullable)other;

@end