From 7b243392e366907b35f819ac2d416475287d74ea Mon Sep 17 00:00:00 2001 From: Nadia Barbosa Date: Mon, 17 Sep 2018 15:45:22 -0700 Subject: =?UTF-8?q?[ios]=20Add=20delegate=20method=20to=20specify=20the=20?= =?UTF-8?q?user=20location=20annotation=E2=80=99s=20position?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update method name More API drafting Add deprecation flag Add Swift delegate integration test Update method name and documentation Update deprecation notices Update method name Offset anchor point relative to contentFrame Update docs Only run through switch statement if delegate is unimplemented Account for content inset + refactor logic Adjust edgePaddingForFollowing Fix Swift delegate integration test Set up integration test Set up test location manager . Remove unused file reference from test Return CGPoint value from delegate method within integration test setup Test anchor points Make updateUserLocationAnnotationView public Refactor test Update test location manager Changelog entry Doc fixes --- platform/ios/src/MGLMapViewDelegate.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'platform/ios/src/MGLMapViewDelegate.h') diff --git a/platform/ios/src/MGLMapViewDelegate.h b/platform/ios/src/MGLMapViewDelegate.h index 4bd1a95c9b..77dd2e4ef4 100644 --- a/platform/ios/src/MGLMapViewDelegate.h +++ b/platform/ios/src/MGLMapViewDelegate.h @@ -308,6 +308,21 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)mapView:(MGLMapView *)mapView didChangeUserTrackingMode:(MGLUserTrackingMode)mode animated:(BOOL)animated; +/** + Returns a screen coordinate at which to position the user location annotation. + This coordinate is relative to the map view’s origin after applying the map view’s + content insets. + + When unimplemented, the user location annotation is aligned within the center of + the map view with respect to the content insets. + + This method will override any values set by `MGLMapView.userLocationVerticalAlignment` + or `-[MGLMapView setUserLocationVerticalAlignment:]`. + + @param mapView The map view that is tracking the user's location. + */ +- (CGPoint)mapViewUserLocationAnchorPoint:(MGLMapView *)mapView; + #pragma mark Managing the Appearance of Annotations /** -- cgit v1.2.1