Files
MapLibreParticleLab/platform/ios/src/MGLMapView_Internal.h
Jesse Bounds 16b859ff5f [ios] Always set map view reference when annotation view is created. (#5496)
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.
2016-06-28 12:07:12 -07:00

21 lines
644 B
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#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