This fixes two issues with annotation views that were exposed when dragging them: 1) The annotation view's mapView property was not set until it was moved (in `updateAnnotations:`) so it did not always call its delegate back about the map view delegate dragging methods. This adds a call to set the property when an annotation view is created so the delegate methods are always called. 2) Since the mapView is now always set, a call to the map view's callout view for selected annotation was added to the annotation view drag handler. This forces the callout to close and eliminates an issue where the callout would remain visible as an annotation was dragged away which had the visual effect of a detached callout. To make 2 possible, the map views selected callout view was exposed in the private header.
21 lines
644 B
Objective-C
21 lines
644 B
Objective-C
#import <Mapbox/Mapbox.h>
|
||
|
||
/// Minimum size of an annotation’s accessibility element.
|
||
extern const CGSize MGLAnnotationAccessibilityElementMinimumSize;
|
||
|
||
@interface MGLMapView (Internal)
|
||
|
||
/// Currently shown popover representing the selected annotation.
|
||
@property (nonatomic) UIView<MGLCalloutView> *calloutViewForSelectedAnnotation;
|
||
|
||
/** Triggers another render pass even when it is not necessary. */
|
||
- (void)setNeedsGLDisplay;
|
||
|
||
/** Returns whether the map view is currently loading or processing any assets required to render the map */
|
||
- (BOOL)isFullyLoaded;
|
||
|
||
/** Empties the in-memory tile cache. */
|
||
- (void)didReceiveMemoryWarning;
|
||
|
||
@end
|