Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reinvent the course tracking wheel #402

Merged
merged 44 commits into from
Oct 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
b5315f3
Reinvented the course tracking wheel
1ec5 Jul 19, 2017
c97b480
Add user puck
frederoni Jul 19, 2017
d431b5f
wip follow with course
frederoni Jul 20, 2017
22715d7
Use target point and animate if plugged in
frederoni Jul 26, 2017
49e74c2
Tweak user puck
frederoni Jul 31, 2017
8ac0731
Made cameras more consistent
1ec5 Sep 1, 2017
f696bb1
Avoid tracking while previewing a future step
1ec5 Sep 11, 2017
084a116
Disable course tracking on pan or rotation
1ec5 Sep 12, 2017
7805a62
Removed dependency on map SDK user tracking mode
1ec5 Sep 12, 2017
c4abe7b
Fixed transitions to and from overview mode
1ec5 Sep 12, 2017
da0c3b5
Remove unused methods
frederoni Sep 15, 2017
491a6b1
Tweak initial flyTo
frederoni Sep 15, 2017
53c8338
Hide resume initially
frederoni Sep 18, 2017
8310cef
Use location from route controller
frederoni Sep 18, 2017
6ad004a
Clean up
frederoni Sep 18, 2017
adb7199
Cap frame rate when unplugged
frederoni Sep 18, 2017
b5e544d
Stop interrupting manual camera position and show recenter when needed
frederoni Sep 19, 2017
1027fc4
Added a new user puck
frederoni Sep 20, 2017
d5a6375
Clean up user puck
frederoni Sep 21, 2017
7c8ffd3
Remove unused and optimize
frederoni Sep 22, 2017
869d478
Remove debug object
frederoni Sep 22, 2017
39d3e10
Fix initial flyTo and resume tracking animation
frederoni Sep 22, 2017
7ca930a
Fixed direction when tracking course
frederoni Sep 22, 2017
bad1e30
Fix tracking for zoom and fling gesture
frederoni Sep 28, 2017
5872cbe
Moved battery monitoring to NavigationMapView
1ec5 Sep 29, 2017
98f130b
NavigationViewController always has a NavigationMapView
1ec5 Sep 29, 2017
fb12945
Fix empty method body in category
frederoni Oct 2, 2017
2af573f
Shrink puck in overview mode
1ec5 Oct 3, 2017
0903d0a
Disable throttling
frederoni Oct 3, 2017
2003877
Add deg->rad
frederoni Oct 3, 2017
7de007d
remove unnecessary hasFinishedLoadingMap
Oct 3, 2017
c1f5926
Styleable user puck
frederoni Oct 6, 2017
8675bed
Configurable user course view positioning
1ec5 Oct 7, 2017
1761173
Fix drifting when changing orientation
frederoni Oct 7, 2017
eba531e
set tracksUserCourse = true when swiping to current step
Oct 9, 2017
1d086af
Re-enable location snapping
frederoni Oct 9, 2017
1c9a575
Remove excessive disabling of tracksUserCourse
frederoni Oct 9, 2017
429aac9
Move gesture changed to cover all recognizers
frederoni Oct 10, 2017
9fe6b28
remove example
Oct 12, 2017
068741e
Hold altitude user changes
Oct 12, 2017
134df48
Set on end
Oct 12, 2017
a4063b8
Override anchor point and capture altitude after tap recognizers anim…
frederoni Oct 12, 2017
51ae745
Don't update tracksUserCourse when changing page
frederoni Oct 12, 2017
61f9695
Re-enable tracksUserCourse when swiping to current step
frederoni Oct 12, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Examples/Swift/Example-Swift-BridgingHeader.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#pragma once

#import "MGLMapView+CustomAdditions.h"
10 changes: 10 additions & 0 deletions Examples/Swift/MGLMapView+CustomAdditions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#import <Mapbox/Mapbox.h>

@interface MGLMapView (CustomAdditions) <CLLocationManagerDelegate>

// FIXME: This will be removed once https://github.com/mapbox/mapbox-gl-native/issues/6867 is implemented
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray<CLLocation *> *)locations;

@property (nonatomic, readonly) CLLocationManager *locationManager;

@end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@frederoni is this file necessary?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, it's necessary until we rewrite the custom example to use something like the new course tracking view. We could reuse this implementation but having the custom example rely on MapboxNavigation contradicts the whole purpose of the custom navigation example.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@frederoni so if we were to merge this now, in what case is it necessary for developers to add this file?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You only need it for simulating location updates in the custom example/MapboxCoreNavigation. Same as prior to this PR but we moved it from MGLMapView+MGLNavigationAdditions.h to +CustomAdditions.

11 changes: 11 additions & 0 deletions Examples/Swift/MGLMapView+CustomAdditions.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#import "MGLMapView+CustomAdditions.h"

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wincomplete-implementation"
// Supressing compiler warning until https://github.com/mapbox/mapbox-gl-native/issues/6867 is implemented
@implementation MGLMapView (CustomAdditions)
#pragma clang diagnostic pop

@dynamic locationManager;

@end
34 changes: 0 additions & 34 deletions Examples/Swift/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ class ViewController: UIViewController, MGLMapViewDelegate, CLLocationManagerDel

var alertController: UIAlertController!

// In this example, we show you how you can create custom UIView that is used to show the user's location.
// Set `showCustomUserPuck` to true to view the custom user puck.
var showCustomUserPuck = false

override func viewDidLoad() {
super.viewDidLoad()

Expand Down Expand Up @@ -261,37 +257,7 @@ extension ViewController: NavigationViewControllerDelegate {

navigationViewController.present(confirmationController, animated: true, completion: nil)
}

func navigationMapView(_ mapView: MGLMapView, viewFor annotation: MGLAnnotation) -> MGLAnnotationView? {
guard annotation is MGLUserLocation && showCustomUserPuck else { return nil }

let reuseIdentifier = "userPuck"
var annotationView = mapView.dequeueReusableAnnotationView(withIdentifier: reuseIdentifier)

if annotationView == nil {
annotationView = CustomAnnotationView(reuseIdentifier: reuseIdentifier)
annotationView!.frame = CGRect(x: 0, y: 0, width: 40, height: 40)
annotationView!.backgroundColor = .red
}

return annotationView
}
}

class CustomAnnotationView: MGLUserLocationAnnotationView {
override func layoutSubviews() {
super.layoutSubviews()

// Force the annotation view to maintain a constant size when the map is tilted.
scalesWithViewingDistance = false

// Use CALayer’s corner radius to turn this view into a circle.
layer.cornerRadius = frame.width / 2
layer.borderWidth = 2
layer.borderColor = UIColor.white.cgColor
}
}

class CustomNightStyle: DayStyle {

required init() {
Expand Down
3 changes: 3 additions & 0 deletions MapboxCoreNavigation/NavigationLocationManager.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Foundation
import CoreLocation
#if os(iOS)
import UIKit
#endif

#if os(iOS)
import UIKit
Expand Down
2 changes: 1 addition & 1 deletion MapboxCoreNavigation/RouteController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ open class RouteController: NSObject {
/**
The most recently received user location.

This is a raw location received from `locationManager`. To obtain an idealized location, use the `snappedLocation` property.
This is a raw location received from `locationManager`. To obtain an idealized location, use the `location` property.
*/
var rawLocation: CLLocation?

Expand Down
18 changes: 16 additions & 2 deletions MapboxNavigation.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
359574AA1F28CCBB00838209 /* LocationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 359574A91F28CCBB00838209 /* LocationTests.swift */; };
359D00CF1E732D7100C2E770 /* Polyline.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 354A01BC1E66259600D765C2 /* Polyline.framework */; };
35A5413B1EFC052700E49846 /* RouteOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35A5413A1EFC052700E49846 /* RouteOptions.swift */; };
35B1E2951F1FF8EC00A13D32 /* UserCourseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35B1E2941F1FF8EC00A13D32 /* UserCourseView.swift */; };
35B711D21E5E7AD2001EDA8D /* MapboxNavigationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35B711D11E5E7AD2001EDA8D /* MapboxNavigationTests.swift */; };
35B711D41E5E7AD2001EDA8D /* MapboxNavigation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 351BEBD71E5BCC28006FE110 /* MapboxNavigation.framework */; };
35B839491E2E3D5D0045A868 /* MBRouteController.m in Sources */ = {isa = PBXBuildFile; fileRef = 35B839481E2E3D5D0045A868 /* MBRouteController.m */; };
Expand All @@ -118,7 +119,6 @@
35CC141A1F79A43B009E872A /* Turf.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 35CC14141F799496009E872A /* Turf.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
35CF34B11F0A733200C2692E /* UIFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35CF34B01F0A733200C2692E /* UIFont.swift */; };
35D457A71E2D253100A89946 /* MBRouteController.h in Headers */ = {isa = PBXBuildFile; fileRef = 35D457A61E2D253100A89946 /* MBRouteController.h */; settings = {ATTRIBUTES = (Public, ); }; };
35D825FB1E6A2DBE0088F83B /* MGLMapView+MGLNavigationAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 35D825F91E6A2DBE0088F83B /* MGLMapView+MGLNavigationAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
35D825FC1E6A2DBE0088F83B /* MGLMapView+MGLNavigationAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 35D825FA1E6A2DBE0088F83B /* MGLMapView+MGLNavigationAdditions.m */; };
35D825FE1E6A2EC60088F83B /* MapboxNavigation.h in Headers */ = {isa = PBXBuildFile; fileRef = 35D825FD1E6A2EC60088F83B /* MapboxNavigation.h */; settings = {ATTRIBUTES = (Public, ); }; };
35DC9D8D1F431E59001ECD64 /* route.json in Resources */ = {isa = PBXBuildFile; fileRef = C52D09CD1DEF5E5100BE3C5C /* route.json */; };
Expand Down Expand Up @@ -166,6 +166,8 @@
C5E7A31C1F4F6828001CB015 /* NavigationRouteOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5E7A31B1F4F6828001CB015 /* NavigationRouteOptions.swift */; };
C5EA98711F19414200C8AA16 /* MapboxMobileEvents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C549F8311F17F2C5001A0A2D /* MapboxMobileEvents.framework */; };
C5EA98721F19414C00C8AA16 /* MapboxMobileEvents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C549F8311F17F2C5001A0A2D /* MapboxMobileEvents.framework */; };
DA23C9611F4FC05C00BA9522 /* MGLMapView+MGLNavigationAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 35D825F91E6A2DBE0088F83B /* MGLMapView+MGLNavigationAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA23C9641F4FC0A600BA9522 /* MGLMapView+CustomAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = DA23C9631F4FC0A600BA9522 /* MGLMapView+CustomAdditions.m */; };
DAAE5F301EAE4C4700832871 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DAAE5F321EAE4C4700832871 /* Localizable.strings */; };
DAB2CCE71DF7AFDF001B2FE1 /* dc-line.geojson in Resources */ = {isa = PBXBuildFile; fileRef = DAB2CCE61DF7AFDE001B2FE1 /* dc-line.geojson */; };
DAFA92071F01735000A7FB09 /* DistanceFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 351BEC0B1E5BCC72006FE110 /* DistanceFormatter.swift */; };
Expand Down Expand Up @@ -383,6 +385,7 @@
359574A91F28CCBB00838209 /* LocationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationTests.swift; sourceTree = "<group>"; };
35A1D3651E6624EF00A48FE8 /* Mapbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Mapbox.framework; path = Carthage/Build/iOS/Mapbox.framework; sourceTree = "<group>"; };
35A5413A1EFC052700E49846 /* RouteOptions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RouteOptions.swift; sourceTree = "<group>"; };
35B1E2941F1FF8EC00A13D32 /* UserCourseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserCourseView.swift; sourceTree = "<group>"; };
35B711CF1E5E7AD2001EDA8D /* MapboxNavigationTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MapboxNavigationTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
35B711D11E5E7AD2001EDA8D /* MapboxNavigationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapboxNavigationTests.swift; sourceTree = "<group>"; };
35B711D31E5E7AD2001EDA8D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -455,6 +458,8 @@
C5D9800C1EFA8BA9006DBF2E /* CustomViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomViewController.swift; sourceTree = "<group>"; };
C5D9800E1EFBCDAD006DBF2E /* Date.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Date.swift; sourceTree = "<group>"; };
C5E7A31B1F4F6828001CB015 /* NavigationRouteOptions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationRouteOptions.swift; sourceTree = "<group>"; };
DA23C9621F4FC0A600BA9522 /* MGLMapView+CustomAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MGLMapView+CustomAdditions.h"; sourceTree = "<group>"; };
DA23C9631F4FC0A600BA9522 /* MGLMapView+CustomAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MGLMapView+CustomAdditions.m"; sourceTree = "<group>"; };
DA3327391F50C6DA00C5EE88 /* sl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = sl; path = sl.lproj/Main.strings; sourceTree = "<group>"; };
DA33273A1F50C6FC00C5EE88 /* sl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = sl; path = sl.lproj/Main.strings; sourceTree = "<group>"; };
DA33273B1F50C70E00C5EE88 /* sl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = sl; path = sl.lproj/Navigation.strings; sourceTree = "<group>"; };
Expand Down Expand Up @@ -496,6 +501,7 @@
DAAE5F311EAE4C4700832871 /* Base */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = "<group>"; };
DAAE5F331EAE4C5A00832871 /* zh-Hans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; };
DAB2CCE61DF7AFDE001B2FE1 /* dc-line.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "dc-line.geojson"; sourceTree = "<group>"; };
DACCD9CD1F1FE05C00BB09A1 /* Example-Swift-BridgingHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Example-Swift-BridgingHeader.h"; sourceTree = "<group>"; };
DAE7114C1F22E94E009AED76 /* it */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Main.strings; sourceTree = "<group>"; };
DAE7114D1F22E966009AED76 /* it */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Main.strings; sourceTree = "<group>"; };
DAE7114E1F22E977009AED76 /* it */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Navigation.strings; sourceTree = "<group>"; };
Expand Down Expand Up @@ -596,6 +602,7 @@
35002D721E5F6C830090E733 /* Supporting files */ = {
isa = PBXGroup;
children = (
DACCD9CD1F1FE05C00BB09A1 /* Example-Swift-BridgingHeader.h */,
355D20DB1EF30A6D0012B1E0 /* tunnel.route */,
354D9F871EF2FE900006FAA8 /* tunnel.json */,
35002D661E5F6B1B0090E733 /* Main.storyboard */,
Expand Down Expand Up @@ -647,6 +654,7 @@
35025F3E1F051DD2002BA3EA /* DialogViewController.swift */,
35375EC01F31FA86004CE727 /* Settings.swift */,
C5A6B2DC1F4CE8E8004260EA /* StyleType.swift */,
35B1E2941F1FF8EC00A13D32 /* UserCourseView.swift */,
);
path = MapboxNavigation;
sourceTree = "<group>";
Expand Down Expand Up @@ -713,6 +721,8 @@
358D14671E5E3B7700ADE590 /* ViewController.swift */,
C5D9800C1EFA8BA9006DBF2E /* CustomViewController.swift */,
6441B1691EFC64E50076499F /* WaypointConfirmationViewController.swift */,
DA23C9621F4FC0A600BA9522 /* MGLMapView+CustomAdditions.h */,
DA23C9631F4FC0A600BA9522 /* MGLMapView+CustomAdditions.m */,
);
name = Swift;
path = Examples/Swift;
Expand Down Expand Up @@ -934,8 +944,8 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
DA23C9611F4FC05C00BA9522 /* MGLMapView+MGLNavigationAdditions.h in Headers */,
35D825FE1E6A2EC60088F83B /* MapboxNavigation.h in Headers */,
35D825FB1E6A2DBE0088F83B /* MGLMapView+MGLNavigationAdditions.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -1380,6 +1390,7 @@
C58159011EA6D02700FC6C3D /* MGLVectorSource.swift in Sources */,
351BEBF51E5BCC63006FE110 /* RouteManeuverViewController.swift in Sources */,
351BEC011E5BCC63006FE110 /* TurnArrowView.swift in Sources */,
35B1E2951F1FF8EC00A13D32 /* UserCourseView.swift in Sources */,
351BEBFA1E5BCC63006FE110 /* RouteTableViewController.swift in Sources */,
35025F3F1F051DD2002BA3EA /* DialogViewController.swift in Sources */,
351BEC0E1E5BCC72006FE110 /* DashedLineView.swift in Sources */,
Expand Down Expand Up @@ -1418,6 +1429,7 @@
files = (
358D14681E5E3B7700ADE590 /* ViewController.swift in Sources */,
C5D9800D1EFA8BA9006DBF2E /* CustomViewController.swift in Sources */,
DA23C9641F4FC0A600BA9522 /* MGLMapView+CustomAdditions.m in Sources */,
6441B16A1EFC64E50076499F /* WaypointConfirmationViewController.swift in Sources */,
358D14661E5E3B7700ADE590 /* AppDelegate.swift in Sources */,
);
Expand Down Expand Up @@ -1808,6 +1820,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.mapbox.Example-Swift";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Examples/Swift/Example-Swift-BridgingHeader.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
};
Expand All @@ -1829,6 +1842,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.mapbox.Example-Swift";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Examples/Swift/Example-Swift-BridgingHeader.h";
SWIFT_VERSION = 3.0;
};
name = Release;
Expand Down
2 changes: 2 additions & 0 deletions MapboxNavigation/DayStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ open class DayStyle: Style {
FloatingButton.appearance().tintColor = tintColor
FloatingButton.appearance().backgroundColor = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1)

UserPuckCourseView.appearance().puckColor = #colorLiteral(red: 0.149, green: 0.239, blue: 0.341, alpha: 1)

// Maneuver view (Page view)
ManeuverView.appearance().backgroundColor = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1)

Expand Down
8 changes: 2 additions & 6 deletions MapboxNavigation/MGLMapView+MGLNavigationAdditions.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@

@interface MGLMapView (MGLNavigationAdditions) <CLLocationManagerDelegate>

// FIXME: This will be removed once https://github.com/mapbox/mapbox-gl-native/issues/6867 is implemented
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray<CLLocation *> *)locations;
- (void)mapViewDidFinishRenderingFrameFullyRendered:(BOOL)fullyRendered;

// FIXME: This will be removed once https://github.com/mapbox/mapbox-navigation-ios/issues/352 is implemented.
- (void)validateLocationServices;

@property (nonatomic, readonly) CLLocationManager *locationManager;
@property (nonatomic, readonly) CADisplayLink * _Nullable displayLink;

@end
5 changes: 3 additions & 2 deletions MapboxNavigation/MGLMapView+MGLNavigationAdditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wincomplete-implementation"
// Supressing compiler warning until https://github.com/mapbox/mapbox-gl-native/issues/6867 is implemented
@implementation MGLMapView (MGLNavigationAdditions)
#pragma clang diagnostic pop

@dynamic locationManager;
- (CADisplayLink *)displayLink {
return [self valueForKey:@"_displayLink"];
}

@end
Loading