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

Start & Stop Navigation in existing Map #54

Merged
merged 48 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
62bb7e2
Add Example project
Patrick-Kladek May 16, 2024
db580a0
fix build
Patrick-Kladek May 16, 2024
ea7c5ed
add mapbox directions for calculating route
Patrick-Kladek May 16, 2024
ee9b0a3
allow to start navigation after init
Patrick-Kladek May 17, 2024
1ff2c04
remove storyboard from example app
Patrick-Kladek May 17, 2024
aa13482
hide UI and show when navigation starts
Patrick-Kladek May 20, 2024
202611d
hide UI on route canceled
Patrick-Kladek May 20, 2024
ef43ec6
correctly hide and show Controls with animation
Patrick-Kladek May 20, 2024
22b9a30
hide course view when no view is assigned
Patrick-Kladek May 21, 2024
2cbe904
hide resume button with rest of UI
Patrick-Kladek May 21, 2024
f08b1be
fix crash on end route
Patrick-Kladek May 21, 2024
52b47f9
add delegate callback when navigation arrived at destination
Patrick-Kladek May 21, 2024
6d88391
remove deprecated code (below iOS11)
Patrick-Kladek May 23, 2024
4d3ef40
correctly show banner on second navigation
Patrick-Kladek May 23, 2024
53aedb1
Remove Feedback form
Patrick-Kladek May 23, 2024
08e39b2
remove route from NavigationViewController init
Patrick-Kladek May 23, 2024
bb87d68
add styleURL to NavigationViewController init
Patrick-Kladek May 23, 2024
28d894c
add button to example to randomly position camera
Patrick-Kladek May 23, 2024
abf84ec
restore map after ending route
Patrick-Kladek May 29, 2024
89dec63
whitespace changes
Patrick-Kladek May 31, 2024
7254d13
Merge branch 'main' of https://github.com/maplibre/maplibre-navigatio…
Patrick-Kladek May 31, 2024
72b55be
unify start and stop navigation method names
Patrick-Kladek May 31, 2024
cf1c944
remove external files
Patrick-Kladek May 31, 2024
eb6eeef
add button to start navigation
Patrick-Kladek May 31, 2024
ab6f05c
fix tests
Patrick-Kladek May 31, 2024
ce59d6f
make routeMapViewController non optional
Patrick-Kladek Jun 6, 2024
b89cecb
fix example
Patrick-Kladek Jun 6, 2024
4435708
Merge branch 'main' of https://github.com/HudHud-Maps/maplibre-naviga…
Patrick-Kladek Jun 6, 2024
8efe794
fix idleTimer disable & statusView for simulatedLocationManager speed…
Patrick-Kladek Jun 6, 2024
e064c96
add backwards compatibility
Patrick-Kladek Jun 6, 2024
04e4fd4
fix tests
Patrick-Kladek Jun 6, 2024
5c845cd
address PR comments
Patrick-Kladek Jun 7, 2024
3dd0e4f
address PR comments
Patrick-Kladek Jun 10, 2024
fa8fbbc
improve documentation
Patrick-Kladek Jun 11, 2024
39a388b
Add Changelog
Patrick-Kladek Jun 11, 2024
7bf9be4
fix tests
Patrick-Kladek Jun 11, 2024
adc5d91
fix indent
Patrick-Kladek Jun 12, 2024
20cd030
Update README.md
Patrick-Kladek Jun 12, 2024
fdad578
Update README.md
Patrick-Kladek Jun 12, 2024
335688a
update readme
Patrick-Kladek Jun 12, 2024
7a0d04e
remove duplicated changelog entry
Patrick-Kladek Jun 12, 2024
1998d53
update readme
Patrick-Kladek Jun 12, 2024
9cc42ff
Update README.md
Patrick-Kladek Jun 13, 2024
0c6734e
clarify removal of delegate method
Patrick-Kladek Jun 13, 2024
b7a5429
Merge branch 'maplibre:main' into feature/example
Patrick-Kladek Jun 13, 2024
529f315
Merge branch 'main' of https://github.com/HudHud-Maps/maplibre-naviga…
Patrick-Kladek Jun 18, 2024
fb2197a
forward mapView delegate methods
Patrick-Kladek Jun 18, 2024
9ccb7b8
fix tests
Patrick-Kladek Jun 19, 2024
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
Binary file added .github/navigation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ iOSInjectionProject/
Packages
xcuserdata
*.xcodeproj

!Example/Example.xcodeproj

### SwiftPM ###

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
LastUpgradeVersion = "1540"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
71 changes: 43 additions & 28 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,58 @@
# Changes to the Mapbox Navigation SDK for iOS

## Unreleased
* Start & Stop Navigation in existing Map
- Removed: `NavigationViewController(for route: Route, dayStyle: Style, routeController: RouteController? = nil, locationManager: NavigationLocationManager? = nil, voiceController: RouteVoiceController? = nil)` use `NavigationViewController(dayStyleURL: URL, nightStyleURL: URL? = nil,directions: Directions = .shared, voiceController: RouteVoiceController = RouteVoiceController())` followed by `startNavigation(with route: Route)` instead.
- To simulate a route, pass a `SimulatedLocationManager` to `startNavigation()` function:

```swift
let vc = NavigationViewController(dayStyleURL: AppConfig().tileserverStyleUrl)

if Env.current.simulateLocationForTesting {
let simulatedLocationManager = SimulatedLocationManager(route: route)
simulatedLocationManager.speedMultiplier = 5
Patrick-Kladek marked this conversation as resolved.
Show resolved Hide resolved
vc.startNavigation(with: route, locationManager: simulatedLocationManager)
} else {
vc.startNavigation(with: route)
}
```

## 3.0.0 (Jun 15, 2024)
- The `speak` method in `RouteVoiceController` can be used without a given `RouteProgress` or the `RouteProgress` can explicitly ignored so that it will not be added to the voice instruction.
- `RouteProgress` is now optional in `willSpeak` method of `VoiceControllerDelegate` if the `RouteProgress` in the `speak` method of the `RouteVoiceController is `nil`.
- Uses the `Locale` given in `RouteOptions` to create the corresponding `AVSpeechSynthesisVoice`.
- Removed setCamera() from updateCourseTracking()
- Added setCamera() to progressDidChange()
- Allow to customize rerouting logic by implementing RouteControllerDelegate#routeControllerGetDirections
- Add option to overwrite camera update via NavigationMapViewCourseTrackingDelegate#updateCamera
- Remove MapboxVoiceController and Mapbox Speech dependency. If you would like to use MapboxSpeech, you can copy the deleted MapboxVoiceController into your project.
- Updated MapLibre Native dependency to ios-v6.0.0 (https://github.com/maplibre/maplibre-native/releases/tag/ios-v6.0.0). Implementers need to change the prefix MGL to MLN for all MapLibre Native classes that are referenced.
- Only snap location to route if the location is within the `RouteControllerUserLocationSnappingDistance`
- Add support for Swift Package Manager while dropping Carthage and Cocoapods.
- Initialization no longer tries to add mapbox://mapbox.mapbox-streets-v7 to all mapstyles.
- Removed implicit default dependencies on MapBox tileservers by requiring explicit styles URLs in more places.
- Merged in <https://github.com/maplibre/maplibre-navigation-ios/pull/45>.
- BREAKING: Removed `MLNStyle` extensions referencing non-functioning MapBox styles, e.g. `MLNStyle.navigationGuidanceDayStyleURL`.
- Added `Day/NightStyle(styleURL:)` which takes an explicit URL to a hosting tileserver style.
- Added `Day/NightStyle(demoStyle: ())` as an explicit alternative when the user doesn't have a tileserver handy. This uses MapLibre's demo style and is intended for testing and demonstration use only.
- Deprecated `DayStyle()`/`NightStyle()` initializers because they were backed by an implicit tile service. If these default styles *are* still used, they'll now use the MapLibre demo style.
- `NavigationViewController` now expects explicit style URLs with `NavigationViewController(route:dayStyleURL:nightStyleURL:...)` or NavigationViewController(route:dayStyle:nightStyle:...)` and the existing initializer, which allowed "default" styles, is deprecated and uses the MapLibre demo styles.
- Fix: NavigationViewController was not re-routing when the user went off route.
- Merged in <https://github.com/maplibre/maplibre-navigation-ios/pull/47>
- Fix: NavigationViewController displayed incorrect `speedMultiplier` when using SimulatedLocationManager
- Merged in <https://github.com/maplibre/maplibre-navigation-ios/pull/49>
* The `speak` method in `RouteVoiceController` can be used without a given `RouteProgress` or the `RouteProgress` can explicitly ignored so that it will not be added to the voice instruction.
* `RouteProgress` is now optional in `willSpeak` method of `VoiceControllerDelegate` if the `RouteProgress` in the `speak` method of the `RouteVoiceController is `nil`.
* Uses the `Locale` given in `RouteOptions` to create the corresponding `AVSpeechSynthesisVoice`.
* Removed setCamera() from updateCourseTracking()
* Added setCamera() to progressDidChange()
* Allow to customize rerouting logic by implementing RouteControllerDelegate#routeControllerGetDirections
* Add option to overwrite camera update via NavigationMapViewCourseTrackingDelegate#updateCamera
* Remove MapboxVoiceController and Mapbox Speech dependency. If you would like to use MapboxSpeech, you can copy the deleted MapboxVoiceController into your project.
* Updated MapLibre Native dependency to ios-v6.0.0 (https://github.com/maplibre/maplibre-native/releases/tag/ios-v6.0.0). Implementers need to change the prefix MGL to MLN for all MapLibre Native classes that are referenced.
* Only snap location to route if the location is within the `RouteControllerUserLocationSnappingDistance`
* Add support for Swift Package Manager while dropping Carthage and Cocoapods.
* Initialization no longer tries to add mapbox://mapbox.mapbox-streets-v7 to all mapstyles.
* Removed implicit default dependencies on MapBox tileservers by requiring explicit styles URLs in more places.
- Merged in <https://github.com/maplibre/maplibre-navigation-ios/pull/45>.
- BREAKING: Removed `MLNStyle` extensions referencing non-functioning MapBox styles, e.g. `MLNStyle.navigationGuidanceDayStyleURL`.
- Added `Day/NightStyle(styleURL:)` which takes an explicit URL to a hosting tileserver style.
- Added `Day/NightStyle(demoStyle: ())` as an explicit alternative when the user doesn't have a tileserver handy. This uses MapLibre's demo style and is intended for testing and demonstration use only.
- Deprecated `DayStyle()`/`NightStyle()` initializers because they were backed by an implicit tile service. If these default styles *are* still used, they'll now use the MapLibre demo style.
- `NavigationViewController` now expects explicit style URLs with `NavigationViewController(route:dayStyleURL:nightStyleURL:...)` or NavigationViewController(route:dayStyle:nightStyle:...)` and the existing initializer, which allowed "default" styles, is deprecated and uses the MapLibre demo styles.
* Fix: NavigationViewController was not re-routing when the user went off route.
- Merged in <https://github.com/maplibre/maplibre-navigation-ios/pull/47>
* Fix: NavigationViewController displayed incorrect `speedMultiplier` when using SimulatedLocationManager
- Merged in <https://github.com/maplibre/maplibre-navigation-ios/pull/49>

## v2.0.0 (May 23, 2023)
- Upgrade minimum iOS version from 11.0 to 12.0.
- Upgraded dependencies to support iOS 12.0
* Upgrade minimum iOS version from 11.0 to 12.0.
* Upgraded dependencies to support iOS 12.0

## v1.0.7 (November 1, 2022)
- Rerouting logic changed
* Rerouting logic changed
- Routes that are found when requesting a new route that are slower but more than 90% the same geometry will get applied. This is done to account for traffic on the route that could change the ETA dramatically
- Added `rerouteReason` parameter in `didRerouteAlong` `RouteControllerDelegate` so the client can react accordingly
- Added option to skip check for rerouting in `RouteController` where route should have 10+mins left before fetching a new route, called `shouldCheckForRerouteInLastMinutes`
- Moved & renamed `RouteControllerProactiveReroutingInterval` to be an instance property of `RouteController` so the client can easily set this per route controller
- Added `shouldReturnTestingETAUpdateReroutes` property to `RouteController` as an easy way to test an ETA update client-side. It uses two of the same test-routes between `52.02224357,5.78149084` and `52.03924958,5.55054131` with different ETA's to easily see the ETA change happen in the client's UI
* Moved & renamed `RouteControllerProactiveReroutingInterval` to be an instance property of `RouteController` so the client can easily set this per route controller
* Added `shouldReturnTestingETAUpdateReroutes` property to `RouteController` as an easy way to test an ETA update client-side. It uses two of the same test-routes between `52.02224357,5.78149084` and `52.03924958,5.55054131` with different ETA's to easily see the ETA change happen in the client's UI

## v1.0.6 (October 5, 2022)

Expand Down
Loading
Loading