This repository has been archived by the owner on Jun 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ios] Add delegate method to specify the user location annotation’s p…
…osition 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
- Loading branch information
1 parent
41dd886
commit 7b24339
Showing
12 changed files
with
147 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#import <XCTest/XCTest.h> | ||
#import <Mapbox/Mapbox.h> | ||
#import "MGLTestUtility.h" | ||
|
||
@interface MGLTestLocationManager : NSObject<MGLLocationManager> | ||
@end | ||
|
||
@interface MGLTestLocationManager() | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#import "MGLTestLocationManager.h" | ||
|
||
// Used to supply integration tests with a simulated location manager. | ||
// Methods that are empty are not used within integration tests and are | ||
// therefore unimplemented. | ||
|
||
@implementation MGLTestLocationManager | ||
|
||
@synthesize delegate; | ||
|
||
- (CLAuthorizationStatus)authorizationStatus { return kCLAuthorizationStatusAuthorizedAlways; } | ||
|
||
- (void)setHeadingOrientation:(CLDeviceOrientation)headingOrientation { } | ||
|
||
- (CLDeviceOrientation)headingOrientation { return 90; } | ||
|
||
- (void)requestAlwaysAuthorization { } | ||
|
||
- (void)requestWhenInUseAuthorization { } | ||
|
||
- (void)startUpdatingHeading { } | ||
|
||
// Simulate one location update | ||
- (void)startUpdatingLocation | ||
{ | ||
if ([self.delegate respondsToSelector:@selector(locationManager:didUpdateLocations:)]) { | ||
CLLocation *location = [[CLLocation alloc] initWithLatitude:37.787357 longitude:-122.39899]; | ||
[self.delegate locationManager:self didUpdateLocations:@[location]]; | ||
} | ||
} | ||
|
||
- (void)stopUpdatingHeading { } | ||
|
||
- (void)stopUpdatingLocation { } | ||
|
||
- (void)dismissHeadingCalibrationDisplay { } | ||
|
||
- (void)dealloc { self.delegate = nil; } | ||
|
||
- (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading { } | ||
|
||
- (BOOL)locationManagerShouldDisplayHeadingCalibration:(CLLocationManager *)manager { return NO; } | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters