@baeckerherz/expo-mapbox-navigation 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# @baeckerherz/expo-mapbox-navigation
|
|
2
2
|
|
|
3
|
-
[](./LICENSE)
|
|
3
|
+
[](./README.md#status) [](./LICENSE)
|
|
4
4
|
|
|
5
|
-
Expo module
|
|
5
|
+
**Expo module for turn-by-turn navigation on iOS and Android** using [Mapbox Navigation SDK v3](https://docs.mapbox.com/ios/navigation/guides/) (iOS) / [Android](https://docs.mapbox.com/android/navigation/guides/). Single `MapboxNavigation` component, Expo config plugin for credentials, no vendored binaries. Minimal alternative to existing community wrappers.
|
|
6
6
|
|
|
7
|
-
> **
|
|
7
|
+
> **Alpha** — Working on **iOS and Android** in our project builds (Expo prebuild, EAS Build). You may use it, but we need more feedback and real-world testing. APIs may change. Not recommended for production without your own testing. **Contributions welcome.** **We’d love to hear from individuals and companies using this package** — open an issue or reach out.
|
|
8
|
+
|
|
9
|
+
**Package summary:** Expo config plugin + native module; Mapbox Navigation SDK v3; iOS (SPM) and Android (Maven, drop-in NavigationView); turn-by-turn driving/walking/cycling; requires Expo ≥51, React Native ≥0.74, Mapbox public + secret tokens; alpha stage; TypeScript API via `MapboxNavigation` component.
|
|
8
10
|
|
|
9
11
|
## Table of contents
|
|
10
12
|
|
|
@@ -153,12 +155,14 @@ Existing wrappers have major drawbacks:
|
|
|
153
155
|
|
|
154
156
|
## Status
|
|
155
157
|
|
|
156
|
-
**
|
|
158
|
+
**Alpha.** Actively used in Bäckerherz project builds (iOS and Android). Goals:
|
|
157
159
|
|
|
158
160
|
1. Reliable SPM injection with Xcode + CocoaPods
|
|
159
161
|
2. Sufficient drop-in NavigationView/NavigationViewController integration
|
|
160
162
|
3. Event bridging for required use cases
|
|
161
163
|
|
|
164
|
+
We want more feedback and testing from the community. Install with `npx expo install @baeckerherz/expo-mapbox-navigation`; for prerelease channels we may publish under the `alpha` npm tag.
|
|
165
|
+
|
|
162
166
|
**Known risks**
|
|
163
167
|
|
|
164
168
|
- **Android:** Drop-in `NavigationView` may need more config for full parity with iOS.
|
|
@@ -166,7 +170,7 @@ Existing wrappers have major drawbacks:
|
|
|
166
170
|
|
|
167
171
|
## Contributing
|
|
168
172
|
|
|
169
|
-
We welcome contributors and maintainers. If you work on Expo native modules, Mapbox SDKs, or React Native tooling, we’d love your help.
|
|
173
|
+
We welcome contributors and maintainers. If you work on Expo native modules, Mapbox SDKs, or React Native tooling, we’d love your help. **If you or your company use this package,** we’d love to hear from you (issues, discussions, or [partner@baeckerherz.at](mailto:partner@baeckerherz.at)) — it helps us prioritize and justify ongoing work.
|
|
170
174
|
|
|
171
175
|
**Project layout:** `src/` (TypeScript API), `ios/` (Swift + podspec), `android/` (Kotlin + build.gradle), `plugin/` (Expo config plugins), `example/` (test app).
|
|
172
176
|
|
|
@@ -188,10 +192,18 @@ Open an [issue](https://github.com/baeckerherz/expo-mapbox-navigation/issues) or
|
|
|
188
192
|
|
|
189
193
|
[MIT](./LICENSE)
|
|
190
194
|
|
|
191
|
-
##
|
|
195
|
+
## Who uses this
|
|
196
|
+
|
|
197
|
+
We’d like to list teams and projects using this package (with your permission). If you’re using it, open an issue or email [partner@baeckerherz.at](mailto:partner@baeckerherz.at).
|
|
192
198
|
|
|
193
|
-
|
|
199
|
+
## Sponsors
|
|
194
200
|
|
|
195
201
|
<a href="https://github.com/baeckerherz"><img src="https://avatars.githubusercontent.com/u/261656164?s=80&v=4" width="48" alt="Bäckerherz" /></a> **[Bäckerherz](https://github.com/baeckerherz)** — Founding sponsor. They build and use this module; the project exists thanks to their investment in open-source Expo tooling.
|
|
196
202
|
|
|
203
|
+
<a href="https://www.tourenflow.com/"><img src="https://www.tourenflow.com/logo.svg" width="48" alt="TourenFlow" /></a> **[TourenFlow](https://www.tourenflow.com/)** — Intelligent tour planning and route optimization.
|
|
204
|
+
|
|
197
205
|
To support the project or work with us: [partner@baeckerherz.at](mailto:partner@baeckerherz.at).
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
<!-- For AI/LLM context: This package is @baeckerherz/expo-mapbox-navigation. It provides turn-by-turn navigation in Expo/React Native apps using Mapbox Navigation SDK v3. Install with npx expo install @baeckerherz/expo-mapbox-navigation. Configure the Expo plugin with mapboxAccessToken and mapboxSecretToken; iOS needs ~/.netrc for SPM, Android uses MAPBOX_DOWNLOADS_TOKEN in gradle.properties. Component: MapboxNavigation with coordinates, locale, mapStyle, themeMode, and events (onRouteProgressChanged, onCancelNavigation, onFinalDestinationArrival, etc.). Alpha stage; iOS and Android supported in maintainer builds. -->
|
package/android/build.gradle
CHANGED
|
@@ -63,9 +63,16 @@ repositories {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
def kotlinVersion = "2.1.20"
|
|
67
|
+
if (rootProject.hasProperty("kotlinVersion")) {
|
|
68
|
+
kotlinVersion = rootProject.kotlinVersion
|
|
69
|
+
} else if (rootProject.ext.has("kotlinVersion")) {
|
|
70
|
+
kotlinVersion = rootProject.ext.get("kotlinVersion")
|
|
71
|
+
}
|
|
72
|
+
|
|
66
73
|
dependencies {
|
|
67
74
|
implementation project(':expo-modules-core')
|
|
68
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${
|
|
75
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlinVersion}"
|
|
69
76
|
|
|
70
77
|
// Mapbox Navigation SDK v3 - drop-in UI
|
|
71
78
|
implementation "com.mapbox.navigationcore:android:3.5.0"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baeckerherz/expo-mapbox-navigation",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Expo module
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "Expo module for turn-by-turn navigation (Mapbox Navigation SDK v3) on iOS and Android. Alpha. Single MapboxNavigation component, Expo config plugin.",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
7
7
|
"expo": {
|
|
@@ -22,7 +22,13 @@
|
|
|
22
22
|
"turn-by-turn",
|
|
23
23
|
"driving",
|
|
24
24
|
"mapbox-navigation-sdk",
|
|
25
|
-
"mapbox-navigation-v3"
|
|
25
|
+
"mapbox-navigation-v3",
|
|
26
|
+
"expo-module",
|
|
27
|
+
"alpha",
|
|
28
|
+
"mapbox-navigation",
|
|
29
|
+
"react-native-navigation",
|
|
30
|
+
"directions",
|
|
31
|
+
"routing"
|
|
26
32
|
],
|
|
27
33
|
"license": "MIT",
|
|
28
34
|
"repository": {
|
|
@@ -2,5 +2,7 @@ import { ConfigPlugin } from "@expo/config-plugins";
|
|
|
2
2
|
/**
|
|
3
3
|
* Adds the authenticated Mapbox Maven repository to the Android
|
|
4
4
|
* project's root build.gradle for Navigation SDK v3 downloads.
|
|
5
|
+
* Must be Groovy syntax (Expo's root build.gradle is Groovy, not Kotlin DSL).
|
|
6
|
+
* See: https://docs.mapbox.com/android/navigation/build-with-nav-sdk/installation/
|
|
5
7
|
*/
|
|
6
8
|
export declare const withMapboxNavGradle: ConfigPlugin;
|
|
@@ -5,6 +5,8 @@ const config_plugins_1 = require("@expo/config-plugins");
|
|
|
5
5
|
/**
|
|
6
6
|
* Adds the authenticated Mapbox Maven repository to the Android
|
|
7
7
|
* project's root build.gradle for Navigation SDK v3 downloads.
|
|
8
|
+
* Must be Groovy syntax (Expo's root build.gradle is Groovy, not Kotlin DSL).
|
|
9
|
+
* See: https://docs.mapbox.com/android/navigation/build-with-nav-sdk/installation/
|
|
8
10
|
*/
|
|
9
11
|
const withMapboxNavGradle = (config) => {
|
|
10
12
|
return (0, config_plugins_1.withProjectBuildGradle)(config, (config) => {
|
|
@@ -15,11 +17,11 @@ const withMapboxNavGradle = (config) => {
|
|
|
15
17
|
maven {
|
|
16
18
|
url = uri("https://api.mapbox.com/downloads/v2/releases/maven")
|
|
17
19
|
authentication {
|
|
18
|
-
|
|
20
|
+
basic(BasicAuthentication)
|
|
19
21
|
}
|
|
20
22
|
credentials {
|
|
21
23
|
username = "mapbox"
|
|
22
|
-
password =
|
|
24
|
+
password = project.findProperty("MAPBOX_DOWNLOADS_TOKEN") ?: System.getenv("MAPBOX_DOWNLOADS_TOKEN") ?: ""
|
|
23
25
|
}
|
|
24
26
|
}`;
|
|
25
27
|
contents = contents.replace(/allprojects\s*\{\s*repositories\s*\{/, `allprojects {\n repositories {${mapboxMaven}`);
|
|
@@ -3,6 +3,8 @@ import { withProjectBuildGradle, ConfigPlugin } from "@expo/config-plugins";
|
|
|
3
3
|
/**
|
|
4
4
|
* Adds the authenticated Mapbox Maven repository to the Android
|
|
5
5
|
* project's root build.gradle for Navigation SDK v3 downloads.
|
|
6
|
+
* Must be Groovy syntax (Expo's root build.gradle is Groovy, not Kotlin DSL).
|
|
7
|
+
* See: https://docs.mapbox.com/android/navigation/build-with-nav-sdk/installation/
|
|
6
8
|
*/
|
|
7
9
|
export const withMapboxNavGradle: ConfigPlugin = (config) => {
|
|
8
10
|
return withProjectBuildGradle(config, (config) => {
|
|
@@ -14,11 +16,11 @@ export const withMapboxNavGradle: ConfigPlugin = (config) => {
|
|
|
14
16
|
maven {
|
|
15
17
|
url = uri("https://api.mapbox.com/downloads/v2/releases/maven")
|
|
16
18
|
authentication {
|
|
17
|
-
|
|
19
|
+
basic(BasicAuthentication)
|
|
18
20
|
}
|
|
19
21
|
credentials {
|
|
20
22
|
username = "mapbox"
|
|
21
|
-
password =
|
|
23
|
+
password = project.findProperty("MAPBOX_DOWNLOADS_TOKEN") ?: System.getenv("MAPBOX_DOWNLOADS_TOKEN") ?: ""
|
|
22
24
|
}
|
|
23
25
|
}`;
|
|
24
26
|
|