Skip to content

Commit

Permalink
v1.0.0-alpha.1
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Jan 11, 2020
1 parent 420c5b6 commit 4859890
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ class ViewController: UIViewController, MGLMapViewDelegate {

// #-code-snippet: navigation draw-route-swift
func drawRoute(route: Route) {
guard route.coordinateCount > 0 else { return }
guard let routeShape = route.shape, routeShape.coordinates.count > 0 else { return }
// Convert the route’s coordinates into a polyline
var routeCoordinates = route.coordinates!
let polyline = MGLPolylineFeature(coordinates: &routeCoordinates, count: route.coordinateCount)
var routeCoordinates = routeShape.coordinates
let polyline = MGLPolylineFeature(coordinates: &routeCoordinates, count: UInt(routeCoordinates.count))

// If there's already a route line on the map, reset its shape to the new route
if let source = mapView.style?.source(withIdentifier: "route-source") as? MGLShapeSource {
Expand Down
28 changes: 18 additions & 10 deletions Navigation-Examples.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,12 @@
"${PODS_ROOT}/Target Support Files/Pods-Navigation-Examples/Pods-Navigation-Examples-frameworks.sh",
"${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/Mapbox.framework",
"${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/Mapbox.framework.dSYM",
"${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/1C04753A-6715-3177-9FDA-8F75B4324E0C.bcsymbolmap",
"${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/EE5140C5-686C-3DED-8916-3717EC675952.bcsymbolmap",
"${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/4794199C-B164-3A2D-A3B4-553B7D49EDD5.bcsymbolmap",
"${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/097AD13C-9FDA-310F-8B76-64CB67B06A27.bcsymbolmap",
"${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/491A77E9-7DBC-3309-A93C-BADAE0DDBC6E.bcsymbolmap",
"${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/3F114CA8-302D-327F-87C3-670E0EC63C9A.bcsymbolmap",
"${BUILT_PRODUCTS_DIR}/MapboxCoreNavigation/MapboxCoreNavigation.framework",
"${BUILT_PRODUCTS_DIR}/MapboxDirections.swift/MapboxDirections.framework",
"${BUILT_PRODUCTS_DIR}/MapboxDirections/MapboxDirections.framework",
"${BUILT_PRODUCTS_DIR}/MapboxMobileEvents/MapboxMobileEvents.framework",
"${BUILT_PRODUCTS_DIR}/MapboxNavigation/MapboxNavigation.framework",
"${PODS_ROOT}/MapboxNavigationNative/MapboxNavigationNative.framework",
Expand All @@ -324,8 +326,10 @@
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mapbox.framework",
"${DWARF_DSYM_FOLDER_PATH}/Mapbox.framework.dSYM",
"${BUILT_PRODUCTS_DIR}/1C04753A-6715-3177-9FDA-8F75B4324E0C.bcsymbolmap",
"${BUILT_PRODUCTS_DIR}/EE5140C5-686C-3DED-8916-3717EC675952.bcsymbolmap",
"${BUILT_PRODUCTS_DIR}/4794199C-B164-3A2D-A3B4-553B7D49EDD5.bcsymbolmap",
"${BUILT_PRODUCTS_DIR}/097AD13C-9FDA-310F-8B76-64CB67B06A27.bcsymbolmap",
"${BUILT_PRODUCTS_DIR}/491A77E9-7DBC-3309-A93C-BADAE0DDBC6E.bcsymbolmap",
"${BUILT_PRODUCTS_DIR}/3F114CA8-302D-327F-87C3-670E0EC63C9A.bcsymbolmap",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxCoreNavigation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxDirections.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxMobileEvents.framework",
Expand Down Expand Up @@ -406,10 +410,12 @@
"${PODS_ROOT}/Target Support Files/Pods-DocsCode/Pods-DocsCode-frameworks.sh",
"${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/Mapbox.framework",
"${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/Mapbox.framework.dSYM",
"${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/1C04753A-6715-3177-9FDA-8F75B4324E0C.bcsymbolmap",
"${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/EE5140C5-686C-3DED-8916-3717EC675952.bcsymbolmap",
"${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/4794199C-B164-3A2D-A3B4-553B7D49EDD5.bcsymbolmap",
"${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/097AD13C-9FDA-310F-8B76-64CB67B06A27.bcsymbolmap",
"${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/491A77E9-7DBC-3309-A93C-BADAE0DDBC6E.bcsymbolmap",
"${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/3F114CA8-302D-327F-87C3-670E0EC63C9A.bcsymbolmap",
"${BUILT_PRODUCTS_DIR}/MapboxCoreNavigation/MapboxCoreNavigation.framework",
"${BUILT_PRODUCTS_DIR}/MapboxDirections.swift/MapboxDirections.framework",
"${BUILT_PRODUCTS_DIR}/MapboxDirections/MapboxDirections.framework",
"${BUILT_PRODUCTS_DIR}/MapboxMobileEvents/MapboxMobileEvents.framework",
"${BUILT_PRODUCTS_DIR}/MapboxNavigation/MapboxNavigation.framework",
"${PODS_ROOT}/MapboxNavigationNative/MapboxNavigationNative.framework",
Expand All @@ -423,8 +429,10 @@
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mapbox.framework",
"${DWARF_DSYM_FOLDER_PATH}/Mapbox.framework.dSYM",
"${BUILT_PRODUCTS_DIR}/1C04753A-6715-3177-9FDA-8F75B4324E0C.bcsymbolmap",
"${BUILT_PRODUCTS_DIR}/EE5140C5-686C-3DED-8916-3717EC675952.bcsymbolmap",
"${BUILT_PRODUCTS_DIR}/4794199C-B164-3A2D-A3B4-553B7D49EDD5.bcsymbolmap",
"${BUILT_PRODUCTS_DIR}/097AD13C-9FDA-310F-8B76-64CB67B06A27.bcsymbolmap",
"${BUILT_PRODUCTS_DIR}/491A77E9-7DBC-3309-A93C-BADAE0DDBC6E.bcsymbolmap",
"${BUILT_PRODUCTS_DIR}/3F114CA8-302D-327F-87C3-670E0EC63C9A.bcsymbolmap",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxCoreNavigation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxDirections.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxMobileEvents.framework",
Expand Down
4 changes: 2 additions & 2 deletions Navigation-Examples/Examples/Custom-Server.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ extension CustomServerViewController: NavigationViewControllerDelegate {
// Here, we are simulating a custom server.
let routeOptions = NavigationRouteOptions(waypoints: [Waypoint(location: location), self.routeOptions.waypoints.last!])
Directions.shared.calculate(routeOptions) { (waypoints, routes, error) in
guard let routeCoordinates = routes?.first?.coordinates, error == nil else {
guard let routeShape = routes?.first?.shape, error == nil else {
print(error!.localizedDescription)
return
}
Expand All @@ -53,7 +53,7 @@ extension CustomServerViewController: NavigationViewControllerDelegate {
// ❗️IMPORTANT❗️
// Use `Directions.calculateRoutes(matching:completionHandler:)` for navigating on a map matching response.
//
let matchOptions = NavigationMatchOptions(coordinates: routeCoordinates)
let matchOptions = NavigationMatchOptions(coordinates: routeShape.coordinates)

// By default, each waypoint separates two legs, so the user stops at each waypoint.
// We want the user to navigate from the first coordinate to the last coordinate without any stops in between.
Expand Down
4 changes: 2 additions & 2 deletions Navigation-Examples/Examples/Custom-Voice-Controller.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ class CustomVoiceController: MapboxVoiceController {
let straight = NSDataAsset(name: "continuestraight")!.data

override func didPassSpokenInstructionPoint(notification: NSNotification) {
let routeProgress = notification.userInfo![RouteControllerNotificationUserInfoKey.routeProgressKey] as! RouteProgress
let routeProgress = notification.userInfo![RouteController.NotificationUserInfoKey.routeProgressKey] as! RouteProgress
let soundForInstruction = audio(for: routeProgress.currentLegProgress.currentStep)
let instruction = notification.userInfo![RouteControllerNotificationUserInfoKey.spokenInstructionKey] as! SpokenInstruction
let instruction = notification.userInfo![RouteController.NotificationUserInfoKey.spokenInstructionKey] as! SpokenInstruction
play(instruction: instruction, data: soundForInstruction)
}

Expand Down
4 changes: 2 additions & 2 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ platform :ios, '10.0'
use_frameworks!

# pod 'MapboxNavigation', '~> 0.38.0'
pod 'MapboxCoreNavigation', :git => 'https://github.com/mapbox/mapbox-navigation-ios.git'
pod 'MapboxNavigation', :git => 'https://github.com/mapbox/mapbox-navigation-ios.git'
pod 'MapboxCoreNavigation', :git => 'https://github.com/mapbox/mapbox-navigation-ios.git', :tag => 'v1.0.0-alpha.1'
pod 'MapboxNavigation', :git => 'https://github.com/mapbox/mapbox-navigation-ios.git', :tag => 'v1.0.0-alpha.1'

target 'Navigation-Examples' do
end
Expand Down
50 changes: 27 additions & 23 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
PODS:
- Mapbox-iOS-SDK (5.5.0)
- MapboxCoreNavigation (0.38.1):
- MapboxDirections.swift (~> 0.30.0)
- MapboxMobileEvents (~> 0.9.5)
- Mapbox-iOS-SDK (5.6.1):
- MapboxMobileEvents (= 0.10.2)
- MapboxCoreNavigation (1.0.0-alpha.1):
- MapboxDirections (= 1.0.0-alpha.1)
- MapboxMobileEvents (~> 0.10.2)
- MapboxNavigationNative (~> 6.2.1)
- Turf (~> 0.3.0)
- MapboxDirections.swift (0.30.0):
- MapboxDirections (1.0.0-alpha.1):
- Polyline (~> 4.2)
- MapboxMobileEvents (0.9.5)
- MapboxNavigation (0.38.1):
- Mapbox-iOS-SDK (~> 5.2)
- MapboxCoreNavigation (= 0.38.1)
- MapboxSpeech (~> 0.1.0)
- Turf (~> 0.3)
- MapboxMobileEvents (0.10.2)
- MapboxNavigation (1.0.0-alpha.1):
- Mapbox-iOS-SDK (~> 5.6)
- MapboxCoreNavigation (= 1.0.0-alpha.1)
- MapboxSpeech (~> 0.3.0)
- Solar (~> 2.1)
- MapboxNavigationNative (6.2.1)
- MapboxSpeech (0.1.1)
- MapboxSpeech (0.3.0)
- Polyline (4.2.1)
- Solar (2.1.0)
- Turf (0.3.0)

DEPENDENCIES:
- MapboxCoreNavigation (from `https://github.com/mapbox/mapbox-navigation-ios.git`)
- MapboxNavigation (from `https://github.com/mapbox/mapbox-navigation-ios.git`)
- MapboxCoreNavigation (from `https://github.com/mapbox/mapbox-navigation-ios.git`, tag `v1.0.0-alpha.1`)
- MapboxNavigation (from `https://github.com/mapbox/mapbox-navigation-ios.git`, tag `v1.0.0-alpha.1`)

SPEC REPOS:
trunk:
- Mapbox-iOS-SDK
- MapboxDirections.swift
- MapboxDirections
- MapboxMobileEvents
- MapboxNavigationNative
- MapboxSpeech
Expand All @@ -37,29 +39,31 @@ SPEC REPOS:
EXTERNAL SOURCES:
MapboxCoreNavigation:
:git: https://github.com/mapbox/mapbox-navigation-ios.git
:tag: v1.0.0-alpha.1
MapboxNavigation:
:git: https://github.com/mapbox/mapbox-navigation-ios.git
:tag: v1.0.0-alpha.1

CHECKOUT OPTIONS:
MapboxCoreNavigation:
:commit: f634a372e7f01a693f5ed40bf8e95f5b8d877539
:git: https://github.com/mapbox/mapbox-navigation-ios.git
:tag: v1.0.0-alpha.1
MapboxNavigation:
:commit: f634a372e7f01a693f5ed40bf8e95f5b8d877539
:git: https://github.com/mapbox/mapbox-navigation-ios.git
:tag: v1.0.0-alpha.1

SPEC CHECKSUMS:
Mapbox-iOS-SDK: 7fa66a27e586acb14c7f32ec5a487343e3994451
MapboxCoreNavigation: a0b212c232dcea1954ed27078ea5e76620a02f58
MapboxDirections.swift: 1c6df988c24b753888ebd9976d7c98632501a413
MapboxMobileEvents: f6c21b2e59066c5c7093585de7c15adae3b63da0
MapboxNavigation: cb3ca44dabf351a9636e01f62664715c9c2e9eea
Mapbox-iOS-SDK: b31bd62a5dd5b7e688eab787acd3d093a122f4d6
MapboxCoreNavigation: 27910dbc7be46dc61dd4d2b7624ee37f7c33ca88
MapboxDirections: fb8fd9cfabb7d3611576acea37602bcec813f71a
MapboxMobileEvents: 2bc0ca2eedb627b73cf403258dce2b2fa98074a6
MapboxNavigation: b8bf681a7df49783e977a423c0d8a73d5f1b82f8
MapboxNavigationNative: 11dc22140f4698d3f26989f2b6379dc81ef0d4c1
MapboxSpeech: 59b3984d3f433a443d24acf53097f918c5cc70f9
MapboxSpeech: 403415e932e084cf290b9d55c49ab7ea210b9595
Polyline: 0e9890790292741c8186201a536b6bb6a78d02dd
Solar: 2dc6e7cc39186cb0c8228fa08df76fb50c7d8f24
Turf: c6bdf62d6a70c647874f295dd1cf4eefc0c3e9e6

PODFILE CHECKSUM: 994f3b75c2a9334652ea9ed1f5a7711cdee19abf
PODFILE CHECKSUM: 34115e62808c67752f8ab25ff8ca43dc9953277c

COCOAPODS: 1.8.4

0 comments on commit 4859890

Please sign in to comment.