react-native-maplibre-lite 0.1.9 → 0.2.1

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.
Files changed (78) hide show
  1. package/README.md +92 -6
  2. package/lib/module/components/MapView.js +167 -48
  3. package/lib/module/components/MapView.js.map +1 -1
  4. package/lib/module/components/NavigatorHud.js +152 -0
  5. package/lib/module/components/NavigatorHud.js.map +1 -0
  6. package/lib/module/components/NavigatorRecenterButton.js +48 -0
  7. package/lib/module/components/NavigatorRecenterButton.js.map +1 -0
  8. package/lib/module/components/NavigatorVoiceControl.js +173 -0
  9. package/lib/module/components/NavigatorVoiceControl.js.map +1 -0
  10. package/lib/module/components/navigatorChromeTheme.js +98 -0
  11. package/lib/module/components/navigatorChromeTheme.js.map +1 -0
  12. package/lib/module/components/navigatorManeuverIcon.js +210 -0
  13. package/lib/module/components/navigatorManeuverIcon.js.map +1 -0
  14. package/lib/module/components/navigatorVoiceCatalog.js +225 -0
  15. package/lib/module/components/navigatorVoiceCatalog.js.map +1 -0
  16. package/lib/module/components/navigatorVoiceKeys.js +14 -0
  17. package/lib/module/components/navigatorVoiceKeys.js.map +1 -0
  18. package/lib/module/components/navigatorVoicePlayer.js +100 -0
  19. package/lib/module/components/navigatorVoicePlayer.js.map +1 -0
  20. package/lib/module/components/navigatorVoiceStrings.js +31 -0
  21. package/lib/module/components/navigatorVoiceStrings.js.map +1 -0
  22. package/lib/module/components/types.js +47 -0
  23. package/lib/module/components/types.js.map +1 -1
  24. package/lib/module/components/useNavigatorVoice.js +78 -0
  25. package/lib/module/components/useNavigatorVoice.js.map +1 -0
  26. package/lib/module/components/utils.js +26 -0
  27. package/lib/module/components/utils.js.map +1 -1
  28. package/lib/module/components/webMapBuild.js +1 -1
  29. package/lib/module/components/webMapBuild.js.map +1 -1
  30. package/lib/module/index.js.map +1 -1
  31. package/lib/typescript/src/components/MapView.d.ts +15 -2
  32. package/lib/typescript/src/components/MapView.d.ts.map +1 -1
  33. package/lib/typescript/src/components/NavigatorHud.d.ts +13 -0
  34. package/lib/typescript/src/components/NavigatorHud.d.ts.map +1 -0
  35. package/lib/typescript/src/components/NavigatorRecenterButton.d.ts +11 -0
  36. package/lib/typescript/src/components/NavigatorRecenterButton.d.ts.map +1 -0
  37. package/lib/typescript/src/components/NavigatorVoiceControl.d.ts +20 -0
  38. package/lib/typescript/src/components/NavigatorVoiceControl.d.ts.map +1 -0
  39. package/lib/typescript/src/components/navigatorChromeTheme.d.ts +19 -0
  40. package/lib/typescript/src/components/navigatorChromeTheme.d.ts.map +1 -0
  41. package/lib/typescript/src/components/navigatorManeuverIcon.d.ts +20 -0
  42. package/lib/typescript/src/components/navigatorManeuverIcon.d.ts.map +1 -0
  43. package/lib/typescript/src/components/navigatorVoiceCatalog.d.ts +50 -0
  44. package/lib/typescript/src/components/navigatorVoiceCatalog.d.ts.map +1 -0
  45. package/lib/typescript/src/components/navigatorVoiceKeys.d.ts +10 -0
  46. package/lib/typescript/src/components/navigatorVoiceKeys.d.ts.map +1 -0
  47. package/lib/typescript/src/components/navigatorVoicePlayer.d.ts +15 -0
  48. package/lib/typescript/src/components/navigatorVoicePlayer.d.ts.map +1 -0
  49. package/lib/typescript/src/components/navigatorVoiceStrings.d.ts +19 -0
  50. package/lib/typescript/src/components/navigatorVoiceStrings.d.ts.map +1 -0
  51. package/lib/typescript/src/components/types.d.ts +205 -12
  52. package/lib/typescript/src/components/types.d.ts.map +1 -1
  53. package/lib/typescript/src/components/useNavigatorVoice.d.ts +20 -0
  54. package/lib/typescript/src/components/useNavigatorVoice.d.ts.map +1 -0
  55. package/lib/typescript/src/components/utils.d.ts +9 -0
  56. package/lib/typescript/src/components/utils.d.ts.map +1 -1
  57. package/lib/typescript/src/components/webMapBuild.d.ts +1 -1
  58. package/lib/typescript/src/components/webMapBuild.d.ts.map +1 -1
  59. package/lib/typescript/src/index.d.ts +1 -1
  60. package/lib/typescript/src/index.d.ts.map +1 -1
  61. package/package.json +16 -7
  62. package/resources/README.md +62 -0
  63. package/resources/map.html +797 -0
  64. package/src/components/MapView.tsx +209 -58
  65. package/src/components/NavigatorHud.tsx +166 -0
  66. package/src/components/NavigatorRecenterButton.tsx +45 -0
  67. package/src/components/NavigatorVoiceControl.tsx +198 -0
  68. package/src/components/navigatorChromeTheme.ts +118 -0
  69. package/src/components/navigatorManeuverIcon.tsx +177 -0
  70. package/src/components/navigatorVoiceCatalog.ts +275 -0
  71. package/src/components/navigatorVoiceKeys.ts +132 -0
  72. package/src/components/navigatorVoicePlayer.tsx +126 -0
  73. package/src/components/navigatorVoiceStrings.ts +42 -0
  74. package/src/components/types.ts +198 -16
  75. package/src/components/useNavigatorVoice.ts +96 -0
  76. package/src/components/utils.ts +28 -0
  77. package/src/components/webMapBuild.ts +1 -1
  78. package/src/index.tsx +19 -0
package/README.md CHANGED
@@ -36,15 +36,19 @@ It is designed for teams that want a practical MapLibre integration without nati
36
36
  ## Installation
37
37
 
38
38
  ```bash
39
- npm install react-native-maplibre-lite react-native-webview @react-native-async-storage/async-storage @sayem314/react-native-keep-awake @react-native-community/geolocation
39
+ npm install react-native-maplibre-lite react-native-webview @react-native-async-storage/async-storage @sayem314/react-native-keep-awake @react-native-community/geolocation react-native-svg react-native-video
40
40
  ```
41
41
 
42
42
  or
43
43
 
44
44
  ```bash
45
- yarn add react-native-maplibre-lite react-native-webview @react-native-async-storage/async-storage @sayem314/react-native-keep-awake @react-native-community/geolocation
45
+ yarn add react-native-maplibre-lite react-native-webview @react-native-async-storage/async-storage @sayem314/react-native-keep-awake @react-native-community/geolocation react-native-svg react-native-video
46
46
  ```
47
47
 
48
+ `react-native-svg` and `react-native-video` are used by the navigator UI: the
49
+ maneuver/HUD icons are drawn with SVG, and voice guidance clips are played with
50
+ `react-native-video`. They are only needed when you enable `navigator`.
51
+
48
52
  ## Quick Start
49
53
 
50
54
  ```tsx
@@ -124,6 +128,14 @@ Coordinates use `[longitude, latitude]`, the same order as GeoJSON and GraphHopp
124
128
 
125
129
  Navigator mode adds a route line, a current-position arrow, a driving HUD and GraphHopper-based route recalculation.
126
130
 
131
+ The route line and position arrow are drawn inside the WebView, while the
132
+ instruction HUD, the recenter / voice floating buttons and voice playback are
133
+ rendered natively by `MapView`. The WebView streams a HUD view-model and
134
+ abstract voice phrase keys to the native side; the native side renders the UI
135
+ (`react-native-svg`) and plays the matching audio clips (`react-native-video`),
136
+ owning voice selection, volume and persistence (`AsyncStorage`). Tapping the
137
+ recenter button sends a command back to the WebView to recenter the camera.
138
+
127
139
  ```tsx
128
140
  import React, { useRef } from 'react';
129
141
  import { Button, View } from 'react-native';
@@ -168,9 +180,22 @@ export function NavigatorScreen() {
168
180
 
169
181
  Use `setNavigatorPosition(latitude, longitude)` to feed real GPS updates. The WebView side snaps the position to the route, marks arrival, or reroutes when the point is too far from the current route. `pickNavigatorPosition()` is a development helper: the next tap on the map becomes the current navigator position.
170
182
 
183
+ ### Voice guidance (`navigatorVoiceUrl`)
184
+
185
+ Pass `navigatorVoiceUrl` (the `.../voices/data.json` catalog URL) to enable
186
+ voice guidance and the native voice floating button. The native side loads the
187
+ catalog and per-voice manifest, lets the user pick a voice and volume (1–5),
188
+ persists the choice with `AsyncStorage`, maps the phrase keys emitted by the
189
+ WebView to clip URLs and plays them with `react-native-video`. Voice guidance
190
+ uses the Russian phrase set, so it is active only when `navigatorLang` is not
191
+ `'en'`.
192
+
171
193
  ### Navigator chrome (`navigatorChrome`)
172
194
 
173
- Optional object passed as `navigatorChrome` on `MapView` (forwarded to WebView `init`). All keys are optional; omit the prop to keep the default blue theme.
195
+ Optional object passed as `navigatorChrome` on `MapView`. `accent`, `routeLine`
196
+ and `routeOutline` are forwarded to the WebView (route line and arrow); the
197
+ `hud*` keys theme the native HUD panel and the floating buttons. All keys are
198
+ optional; omit the prop to keep the default blue theme.
174
199
 
175
200
  | Key | Purpose |
176
201
  | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -213,7 +238,8 @@ Speed limit styling on the HUD is not configurable.
213
238
  | `graphhopperUrl` | `string` | no | Base GraphHopper URL for navigator routes |
214
239
  | `navigatorLang` | `'ru' \| 'en'` | no | Navigator HUD and instruction language. Defaults to `ru` |
215
240
  | `navigatorProfile` | `NavigatorProfile \| string` | no | GraphHopper routing `profile` (`car`, `bike`, `foot`, …). Unknown → `car` |
216
- | `navigatorChrome` | `NavigatorChromeParams` | no | Navigator colors: route line, arrow accent, HUD (see section above). Sent at init only |
241
+ | `navigatorChrome` | `NavigatorChromeParams` | no | Navigator colors: route line, arrow accent, native HUD/FAB theme (see section above) |
242
+ | `navigatorVoiceUrl` | `string` | no | Voice catalog URL (`.../voices/data.json`). Enables native voice guidance + voice FAB |
217
243
  | `onReady` | `() => void` | no | Called after the WebView map is initialized |
218
244
  | `onMoveStart` | `(params) => void` | no | `movestart` event |
219
245
  | `onMoveEnd` | `(params) => void` | no | `moveend` event |
@@ -224,6 +250,8 @@ Speed limit styling on the HUD is not configurable.
224
250
  | `onNavigatorInstruction` | `(params) => void` | no | Called when a navigator instruction is advanced |
225
251
  | `onNavigatorPositionSet` | `(params) => void` | no | Called after navigator position update/snap/reroute |
226
252
  | `onMapLiteError` | `(error) => void` | no | WebView command error callback |
253
+ | `useNativeMapHtml` | `boolean` | no | Load `map.html` from native app resources instead of inline `MAP_HTML`. See below |
254
+ | `developerLocalhostBundleUrl`| `string` | no | Dev-only: load WebView bundle from a local URL instead of inline or native `map.html` |
227
255
 
228
256
  ### `MapView` ref
229
257
 
@@ -298,9 +326,67 @@ Tips:
298
326
  - Keep number of simultaneously visible overlays moderate
299
327
  - Prefer simpler map styles with fewer labels and 3D layers
300
328
 
329
+ ## Native `map.html` bundle
330
+
331
+ By default, `MapView` loads the map runtime as inline HTML from the generated `webMapBuild.ts` bundle (`MAP_HTML`). For smaller JS bundle size or to update the WebView runtime without republishing the npm package, copy `resources/map.html` into your native app and enable `useNativeMapHtml`:
332
+
333
+ ```tsx
334
+ <MapView
335
+ useNativeMapHtml
336
+ style={{ flex: 1 }}
337
+ center={[37.6173, 55.7558]}
338
+ zoom={11}
339
+ mapStyle="https://demotiles.maplibre.org/style.json"
340
+ />
341
+ ```
342
+
343
+ WebView source priority: `developerLocalhostBundleUrl` → `useNativeMapHtml` → inline `MAP_HTML`.
344
+
345
+ ### Android
346
+
347
+ Copy `map.html` from the package (`node_modules/react-native-maplibre-lite/resources/map.html`) or from this repo after building `webProject`:
348
+
349
+ ```
350
+ android/app/src/main/assets/map.html
351
+ ```
352
+
353
+ Create the `assets` folder if it does not exist. `MapView` loads it as `file:///android_asset/map.html`.
354
+
355
+ ### iOS
356
+
357
+ Copy `map.html` into your app project, for example:
358
+
359
+ ```
360
+ ios/MyApp/map.html
361
+ ```
362
+
363
+ In Xcode:
364
+
365
+ 1. Drag `map.html` into the project tree (not only into Finder).
366
+ 2. Enable **Copy items if needed** and select your app target.
367
+ 3. Confirm the file appears under **Build Phases → Copy Bundle Resources**.
368
+
369
+ The URI is resolved automatically from the `.app` bundle path (release / standalone builds). In Metro dev builds on iOS, prefer the default inline HTML or `developerLocalhostBundleUrl`.
370
+
371
+ ### Updating `map.html`
372
+
373
+ After changes in `webProject`, rebuild and recopy the file into both platforms:
374
+
375
+ ```bash
376
+ cd webProject
377
+ npm run build
378
+ cp ../resources/map.html android/app/src/main/assets/map.html
379
+ cp ../resources/map.html ios/MyApp/map.html
380
+ ```
381
+
382
+ See also [`resources/README.md`](./resources/README.md).
383
+
301
384
  ## Web Bundle Development
302
385
 
303
- The WebView runtime is generated from `webProject` and committed as `src/components/webMapBuild.ts`.
386
+ The WebView runtime is generated from `webProject` and committed as:
387
+
388
+ - `src/components/webMapBuild.ts` — inline `MAP_HTML` used by `MapView` by default
389
+ - `resources/map.html` — same single-file bundle for native app resources (`useNativeMapHtml`)
304
390
 
305
391
  ```bash
306
392
  cd webProject
@@ -308,7 +394,7 @@ npm install
308
394
  npm run build
309
395
  ```
310
396
 
311
- `npm run build` runs Vite and then `webProject/scripts/inlineHtml.mjs`, which writes the single-file HTML bundle back into `src/components/webMapBuild.ts`.
397
+ `npm run build` runs Vite and then `webProject/scripts/inlineHtml.mjs`, which writes both `webMapBuild.ts` and `resources/map.html`.
312
398
 
313
399
  ## Contributing
314
400
 
@@ -1,15 +1,23 @@
1
1
  "use strict";
2
2
 
3
- import { createContext, forwardRef, useContext, useEffect, useImperativeHandle, useRef, useState } from 'react';
3
+ import { createContext, forwardRef, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
4
4
  import { Platform, View } from 'react-native';
5
5
  import { WebView } from 'react-native-webview';
6
6
  import Geolocation from '@react-native-community/geolocation';
7
7
  import KeepAwake from '@sayem314/react-native-keep-awake';
8
8
  import MapPlaceholder from "./MapPlaceholder.js";
9
9
  import MapSelectPoint from "./MapSelectPoint.js";
10
- import { loadResources } from "./utils.js";
10
+ import { NavigatorHud } from "./NavigatorHud.js";
11
+ import { NavigatorRecenterButton } from "./NavigatorRecenterButton.js";
12
+ import { NavigatorVoiceControl } from "./NavigatorVoiceControl.js";
13
+ import { resolveNavigatorChromeTheme } from "./navigatorChromeTheme.js";
14
+ import { keysToClipUrls, volumeLevelToGain } from "./navigatorVoiceCatalog.js";
15
+ import { NavigatorVoicePlayer } from "./navigatorVoicePlayer.js";
16
+ import { navigatorUiStrings } from "./navigatorVoiceStrings.js";
17
+ import { useNavigatorVoice } from "./useNavigatorVoice.js";
18
+ import { loadResources, getNativeMapHtmlUri } from "./utils.js";
11
19
  import { MAP_HTML } from "./webMapBuild.js";
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
21
  const MapViewContext = /*#__PURE__*/createContext(null);
14
22
  export const useMapViewContext = () => {
15
23
  const ctx = useContext(MapViewContext);
@@ -32,6 +40,34 @@ const getBoundsFromCoords = coords => {
32
40
  }
33
41
  return [[minLng, minLat], [maxLng, maxLat]];
34
42
  };
43
+ const toWebMarkerParams = props => ({
44
+ uniqueId: props.uniqueId,
45
+ latitude: props.latitude,
46
+ longitude: props.longitude,
47
+ color: props.color,
48
+ iconUrl: props.iconUrl,
49
+ iconWidth: props.iconWidth,
50
+ iconHeight: props.iconHeight,
51
+ html: props.html
52
+ });
53
+ const toWebPolylineParams = props => ({
54
+ uniqueId: props.uniqueId,
55
+ coordinates: props.coordinates,
56
+ color: props.color,
57
+ width: props.width
58
+ });
59
+ const toWebPolygonParams = props => ({
60
+ uniqueId: props.uniqueId,
61
+ coordinates: props.coordinates,
62
+ fillColor: props.fillColor,
63
+ fillOpacity: props.fillOpacity,
64
+ strokeColor: props.strokeColor,
65
+ strokeOpacity: props.strokeOpacity,
66
+ strokeWidth: props.strokeWidth
67
+ });
68
+ const toWebRemoveParams = uniqueId => ({
69
+ uniqueId
70
+ });
35
71
 
36
72
  /** Минимальный интервал между отправками позиции в WebView (мост RN↔JS). */
37
73
  const NAVIGATOR_GPS_FORWARD_MIN_MS = 500;
@@ -42,10 +78,42 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
42
78
  useEffect(() => {
43
79
  initedRef.current = inited;
44
80
  }, [inited]);
81
+
82
+ /** View-model HUD маршрута, приходит из WebView (`navigatorHud`). */
83
+ const [hudState, setHudState] = useState(null);
84
+ const voicePlayerRef = useRef(null);
85
+
86
+ /** Озвучка ограничена русским набором фраз (как в веб-навигаторе). */
87
+ const voiceSupported = props.navigator === true && props.navigatorLang !== 'en';
88
+ const voice = useNavigatorVoice(voiceSupported ? props.navigatorVoiceUrl : undefined);
89
+ const chromeTheme = useMemo(() => resolveNavigatorChromeTheme(props.navigatorChrome), [props.navigatorChrome]);
90
+ const navigatorStrings = useMemo(() => navigatorUiStrings(props.navigatorLang), [props.navigatorLang]);
91
+ useEffect(() => {
92
+ voicePlayerRef.current?.setVolume(volumeLevelToGain(voice.volumeLevel));
93
+ }, [voice.volumeLevel]);
94
+ const handleNavigatorVoice = params => {
95
+ const player = voicePlayerRef.current;
96
+ if (!player) return;
97
+ if (params.action === 'stop') {
98
+ player.stop();
99
+ return;
100
+ }
101
+ if (params.action === 'prefetch') return;
102
+ if (!voice.voiceEnabled || !voice.manifest || !voice.clipBaseUrl) return;
103
+ const urls = keysToClipUrls(voice.manifest, voice.clipBaseUrl, params.keys);
104
+ if (urls.length > 0) player.playUrls(urls);
105
+ };
45
106
  const coordsInMapRef = useRef({});
46
107
  const markersClickHandlers = useRef({});
47
108
  const mapSelectPointRef = useRef(null);
48
109
  const performanceMode = props.performanceMode ?? (Platform.OS === 'android' ? 'balanced' : 'quality');
110
+ const webViewSource = props.developerLocalhostBundleUrl ? {
111
+ uri: props.developerLocalhostBundleUrl
112
+ } : props.useNativeMapHtml ? {
113
+ uri: getNativeMapHtmlUri()
114
+ } : {
115
+ html: MAP_HTML
116
+ };
49
117
  const fallbackPixelRatio = performanceMode === 'performance' ? 0.85 : performanceMode === 'balanced' && Platform.OS === 'android' ? 1 : undefined;
50
118
  const sendToWebView = message => {
51
119
  if (__DEV__) {
@@ -62,32 +130,33 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
62
130
  }
63
131
  const mapStyleText = await loadResources(props.mapStyle);
64
132
  const mapStyle = JSON.parse(mapStyleText);
133
+ const initParams = {
134
+ mapStyle: mapStyle,
135
+ zoomEnabled: props.zoomEnabled ?? false,
136
+ scrollEnabled: props.scrollEnabled ?? false,
137
+ center: props.center,
138
+ zoom: props.zoom,
139
+ minZoom: props.minZoom,
140
+ maxZoom: props.maxZoom,
141
+ antialias: false,
142
+ crossSourceCollisions: performanceMode !== 'performance',
143
+ fadeDuration: performanceMode === 'performance' ? 0 : 120,
144
+ pixelRatio: props.pixelRatio ?? fallbackPixelRatio,
145
+ simplifyStyle: performanceMode !== 'quality',
146
+ aggressiveSimplifyStyle: performanceMode === 'performance',
147
+ maxPitch: performanceMode === 'performance' ? 0 : 45,
148
+ renderWorldCopies: performanceMode === 'quality',
149
+ turboWhileMoving: props.turboWhileMoving ?? performanceMode === 'performance',
150
+ debugMode: props.debugMode ?? false,
151
+ navigator: props.navigator === true,
152
+ graphhopperUrl: props.graphhopperUrl,
153
+ navigatorLang: props.navigatorLang,
154
+ navigatorProfile: props.navigatorProfile,
155
+ navigatorChrome: props.navigatorChrome
156
+ };
65
157
  sendToWebView({
66
158
  function: 'init',
67
- params: {
68
- mapStyle: mapStyle,
69
- zoomEnabled: props.zoomEnabled ?? false,
70
- scrollEnabled: props.scrollEnabled ?? false,
71
- center: props.center,
72
- zoom: props.zoom,
73
- minZoom: props.minZoom,
74
- maxZoom: props.maxZoom,
75
- antialias: false,
76
- crossSourceCollisions: performanceMode !== 'performance',
77
- fadeDuration: performanceMode === 'performance' ? 0 : 120,
78
- pixelRatio: props.pixelRatio ?? fallbackPixelRatio,
79
- simplifyStyle: performanceMode !== 'quality',
80
- aggressiveSimplifyStyle: performanceMode === 'performance',
81
- maxPitch: performanceMode === 'performance' ? 0 : 45,
82
- renderWorldCopies: performanceMode === 'quality',
83
- turboWhileMoving: props.turboWhileMoving ?? performanceMode === 'performance',
84
- debugMode: props.debugMode ?? false,
85
- navigator: props.navigator === true,
86
- graphhopperUrl: props.graphhopperUrl,
87
- navigatorLang: props.navigatorLang,
88
- navigatorProfile: props.navigatorProfile,
89
- navigatorChrome: props.navigatorChrome
90
- }
159
+ params: initParams
91
160
  });
92
161
  };
93
162
  const updateMarkerClickHandler = propsMarker => {
@@ -104,7 +173,7 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
104
173
  updateMarkerClickHandler(propsMarker);
105
174
  sendToWebView({
106
175
  function: 'addMarker',
107
- params: propsMarker
176
+ params: toWebMarkerParams(propsMarker)
108
177
  });
109
178
  scheduleAutoFitBounds();
110
179
  };
@@ -113,7 +182,7 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
113
182
  delete markersClickHandlers.current[propsMarker.uniqueId];
114
183
  sendToWebView({
115
184
  function: 'removeMarker',
116
- params: propsMarker
185
+ params: toWebRemoveParams(propsMarker.uniqueId)
117
186
  });
118
187
  scheduleAutoFitBounds();
119
188
  };
@@ -123,7 +192,7 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
123
192
  }
124
193
  sendToWebView({
125
194
  function: 'addPolyline',
126
- params: propsPolyline
195
+ params: toWebPolylineParams(propsPolyline)
127
196
  });
128
197
  scheduleAutoFitBounds();
129
198
  };
@@ -131,7 +200,7 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
131
200
  delete coordsInMapRef.current[propsPolyline.uniqueId];
132
201
  sendToWebView({
133
202
  function: 'removePolyline',
134
- params: propsPolyline
203
+ params: toWebRemoveParams(propsPolyline.uniqueId)
135
204
  });
136
205
  scheduleAutoFitBounds();
137
206
  };
@@ -141,7 +210,7 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
141
210
  }
142
211
  sendToWebView({
143
212
  function: 'addPolygon',
144
- params: propsPolygon
213
+ params: toWebPolygonParams(propsPolygon)
145
214
  });
146
215
  scheduleAutoFitBounds();
147
216
  };
@@ -149,7 +218,7 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
149
218
  delete coordsInMapRef.current[propsPolygon.uniqueId];
150
219
  sendToWebView({
151
220
  function: 'removePolygon',
152
- params: propsPolygon
221
+ params: toWebRemoveParams(propsPolygon.uniqueId)
153
222
  });
154
223
  scheduleAutoFitBounds();
155
224
  };
@@ -204,13 +273,17 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
204
273
  params: {}
205
274
  });
206
275
  };
207
- const setNavigatorPosition = (latitude, longitude) => {
276
+ const setNavigatorPosition = (latitude, longitude, accuracy) => {
277
+ const params = {
278
+ latitude,
279
+ longitude
280
+ };
281
+ if (typeof accuracy === 'number' && Number.isFinite(accuracy) && accuracy >= 0) {
282
+ params.accuracy = accuracy;
283
+ }
208
284
  sendToWebView({
209
285
  function: 'setNavigatorPosition',
210
- params: {
211
- latitude,
212
- longitude
213
- }
286
+ params
214
287
  });
215
288
  };
216
289
  const pickNavigatorPosition = () => {
@@ -219,6 +292,12 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
219
292
  params: {}
220
293
  });
221
294
  };
295
+ const recenterNavigatorCamera = () => {
296
+ sendToWebView({
297
+ function: 'recenterNavigatorCamera',
298
+ params: {}
299
+ });
300
+ };
222
301
  useImperativeHandle(ref, () => ({
223
302
  fitBounds,
224
303
  flyTo,
@@ -243,7 +322,14 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
243
322
  updateProps.scrollEnabled = props.scrollEnabled;
244
323
  }
245
324
  if (lastPropsRef.current.mapStyle !== props.mapStyle) {
246
- updateProps.mapStyle = props.mapStyle;
325
+ void loadResources(props.mapStyle).then(mapStyleText => {
326
+ sendToWebView({
327
+ function: 'update',
328
+ params: {
329
+ mapStyle: JSON.parse(mapStyleText)
330
+ }
331
+ });
332
+ });
247
333
  }
248
334
  lastPropsRef.current = props;
249
335
  if (Object.keys(updateProps).length > 0) {
@@ -278,6 +364,9 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
278
364
  case 'idle':
279
365
  props.onIdle?.(msg.params);
280
366
  break;
367
+ case 'error':
368
+ props.onMapError?.(msg.params);
369
+ break;
281
370
  case 'navigatorRouteSet':
282
371
  props.onNavigatorRouteSet?.(msg.params);
283
372
  break;
@@ -287,6 +376,12 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
287
376
  case 'navigatorPositionSet':
288
377
  props.onNavigatorPositionSet?.(msg.params);
289
378
  break;
379
+ case 'navigatorHud':
380
+ setHudState(msg.params);
381
+ break;
382
+ case 'navigatorVoice':
383
+ handleNavigatorVoice(msg.params);
384
+ break;
290
385
  }
291
386
  return;
292
387
  }
@@ -327,6 +422,7 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
327
422
  }
328
423
  const lat = position.coords.latitude;
329
424
  const lng = position.coords.longitude;
425
+ const accuracy = position.coords.accuracy;
330
426
  if (!Number.isFinite(lat) || !Number.isFinite(lng)) {
331
427
  return;
332
428
  }
@@ -335,12 +431,16 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
335
431
  return;
336
432
  }
337
433
  lastForwardedAt = now;
434
+ const params = {
435
+ latitude: lat,
436
+ longitude: lng
437
+ };
438
+ if (typeof accuracy === 'number' && Number.isFinite(accuracy) && accuracy >= 0) {
439
+ params.accuracy = accuracy;
440
+ }
338
441
  sendToWebViewRef.current({
339
442
  function: 'setNavigatorPosition',
340
- params: {
341
- latitude: lat,
342
- longitude: lng
343
- }
443
+ params
344
444
  });
345
445
  }, error => {
346
446
  console.error('MapView: error watching position', error);
@@ -376,11 +476,7 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
376
476
  backgroundColor: 'transparent'
377
477
  },
378
478
  originWhitelist: ['*'],
379
- source: !!props.developerLocalhostBundleUrl ? {
380
- uri: props.developerLocalhostBundleUrl
381
- } : {
382
- html: MAP_HTML
383
- },
479
+ source: webViewSource,
384
480
  onMessage: event => {
385
481
  onReceiveMessageFromWebView(event.nativeEvent.data);
386
482
  },
@@ -403,6 +499,29 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
403
499
  color: props.selectPointColor ?? '#000',
404
500
  backgroundColor: props.selectPointBackgroundColor ?? '#fff'
405
501
  })
502
+ }), inited && props.navigator && /*#__PURE__*/_jsxs(_Fragment, {
503
+ children: [/*#__PURE__*/_jsx(NavigatorHud, {
504
+ state: hudState,
505
+ theme: chromeTheme,
506
+ pickHint: navigatorStrings.pickHint
507
+ }), /*#__PURE__*/_jsx(NavigatorRecenterButton, {
508
+ theme: chromeTheme,
509
+ accessibilityLabel: navigatorStrings.recenterAria,
510
+ onPress: recenterNavigatorCamera
511
+ }), voiceSupported && /*#__PURE__*/_jsx(NavigatorVoiceControl, {
512
+ theme: chromeTheme,
513
+ strings: navigatorStrings,
514
+ catalog: voice.catalog,
515
+ selectedDir: voice.selectedDir,
516
+ voiceEnabled: voice.voiceEnabled,
517
+ volumeLevel: voice.volumeLevel,
518
+ onSelectVoice: voice.selectVoice,
519
+ onSelectVolume: voice.selectVolume,
520
+ onDisable: voice.disableVoice
521
+ }), voiceSupported && /*#__PURE__*/_jsx(NavigatorVoicePlayer, {
522
+ ref: voicePlayerRef,
523
+ initialVolume: volumeLevelToGain(voice.volumeLevel)
524
+ })]
406
525
  })]
407
526
  }), !inited && /*#__PURE__*/_jsx(MapPlaceholder, {
408
527
  theme: props.placeholderTheme ?? 'light'
@@ -1 +1 @@
1
- {"version":3,"names":["createContext","forwardRef","useContext","useEffect","useImperativeHandle","useRef","useState","Platform","View","WebView","Geolocation","KeepAwake","MapPlaceholder","MapSelectPoint","loadResources","MAP_HTML","jsx","_jsx","jsxs","_jsxs","MapViewContext","useMapViewContext","ctx","Error","getBoundsFromCoords","coords","length","minLng","maxLng","minLat","maxLat","lng","lat","NAVIGATOR_GPS_FORWARD_MIN_MS","MapView","props","ref","webViewRef","inited","setInited","initedRef","current","coordsInMapRef","markersClickHandlers","mapSelectPointRef","performanceMode","OS","fallbackPixelRatio","undefined","sendToWebView","message","__DEV__","console","log","postMessage","JSON","stringify","sendToWebViewRef","initMap","mapStyle","mapStyleText","parse","function","params","zoomEnabled","scrollEnabled","center","zoom","minZoom","maxZoom","antialias","crossSourceCollisions","fadeDuration","pixelRatio","simplifyStyle","aggressiveSimplifyStyle","maxPitch","renderWorldCopies","turboWhileMoving","debugMode","navigator","graphhopperUrl","navigatorLang","navigatorProfile","navigatorChrome","updateMarkerClickHandler","propsMarker","onPress","uniqueId","addMarker","latitude","longitude","ignoreFitBounds","scheduleAutoFitBounds","removeMarker","addPolyline","propsPolyline","coordinates","removePolyline","addPolygon","propsPolygon","removePolygon","autoFitBoundsTimeoutRef","autoFitBounds","clearTimeout","setTimeout","fitBounds","fitBoundsPadding","Object","values","flat","bounds","padding","duration","fitBoundsDuration","flyTo","flyToDuration","setNavigatorPoint","advanceNavigatorInstruction","setNavigatorPosition","pickNavigatorPosition","lastPropsRef","updateProps","keys","onReceiveMessageFromWebView","data","msg","type","event","up","onMoveStart","onMoveEnd","down","onZoomStart","onZoomEnd","onIdle","onNavigatorRouteSet","onNavigatorInstruction","onNavigatorPositionSet","onMapLiteError","onReady","handler","e","warn","lastForwardedAt","watchId","watchPosition","position","Number","isFinite","now","Date","error","enableHighAccuracy","interval","fastestInterval","distanceFilter","maximumAge","clearWatch","style","children","Provider","value","flex","backgroundColor","originWhitelist","source","developerLocalhostBundleUrl","uri","html","onMessage","nativeEvent","javaScriptEnabled","domStorageEnabled","showSelectPoint","pointerEvents","justifyContent","alignItems","top","left","width","height","color","selectPointColor","selectPointBackgroundColor","theme","placeholderTheme"],"sourceRoot":"../../../src","sources":["components/MapView.tsx"],"mappings":";;AAAA,SACEA,aAAa,EACbC,UAAU,EACVC,UAAU,EACVC,SAAS,EACTC,mBAAmB,EACnBC,MAAM,EACNC,QAAQ,QACH,OAAO;AAEd,SACEC,QAAQ,EAERC,IAAI,QAEC,cAAc;AACrB,SAASC,OAAO,QAAQ,sBAAsB;AAE9C,OAAOC,WAAW,MAAM,qCAAqC;AAC7D,OAAOC,SAAS,MAAM,mCAAmC;AAEzD,OAAOC,cAAc,MAAM,qBAAkB;AAC7C,OAAOC,cAAc,MAAmC,qBAAkB;AAc1E,SAASC,aAAa,QAAQ,YAAS;AACvC,SAASC,QAAQ,QAAQ,kBAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAqGzC,MAAMC,cAAc,gBAAGpB,aAAa,CAAyB,IAAI,CAAC;AAElE,OAAO,MAAMqB,iBAAiB,GAAGA,CAAA,KAAM;EACnC,MAAMC,GAAG,GAAGpB,UAAU,CAACkB,cAAc,CAAC;EACtC,IAAI,CAACE,GAAG,EAAE,MAAM,IAAIC,KAAK,CAAC,iDAAiD,CAAC;EAC5E,OAAOD,GAAG;AACd,CAAC;AAED,MAAME,mBAAmB,GACrBC,MAA0B,IACa;EACvC,IAAI,CAACA,MAAM,CAACC,MAAM,EAAE;IAChB,MAAM,IAAIH,KAAK,CAAC,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GAAG,CAAE;QACvBC,MAAM,EAAE,CAAC,CAACnI,KAAK,CAACoI,2BAA2B,GAAG;UAAEC,GAAG,EAAErI,KAAK,CAACoI;QAA4B,CAAC,GAAG;UAAEE,IAAI,EAAE1J;QAAS,CAAE;QAC9G2J,SAAS,EAAE1C,KAAK,IAAI;UAChBJ,2BAA2B,CAACI,KAAK,CAAC2C,WAAW,CAAC9C,IAAI,CAAC;QACvD,CAAE;QACF+C,iBAAiB;QACjBC,iBAAiB;QACjB5G,aAAa,EAAE;MAAM,CACxB,CAAC,EAED3B,MAAM,IAAIH,KAAK,CAAC6H,QAAQ,EAExB1H,MAAM,IAAIH,KAAK,CAAC2I,eAAe,iBAC5B7J,IAAA,CAACT,IAAI;QACDuK,aAAa,EAAC,MAAM;QACpBhB,KAAK,EAAE;UACHiB,cAAc,EAAE,QAAQ;UACxBC,UAAU,EAAE,QAAQ;UACpB9B,QAAQ,EAAE,UAAU;UACpB+B,GAAG,EAAE,CAAC;UACNC,IAAI,EAAE,CAAC;UACPC,KAAK,EAAE,MAAM;UACbC,MAAM,EAAE;QACZ,CAAE;QAAArB,QAAA,eAEF/I,IAAA,CAACJ,cAAc;UACXuB,GAAG,EAAEQ,iBAAkB;UACvB0I,KAAK,EAAEnJ,KAAK,CAACoJ,gBAAgB,IAAI,MAAO;UACxCnB,eAAe,EAAEjI,KAAK,CAACqJ,0BAA0B,IAAI;QAAO,CAC/D;MAAC,CACA,CACT;IAAA,CACoB,CAAC,EACzB,CAAClJ,MAAM,iBACJrB,IAAA,CAACL,cAAc;MAAC6K,KAAK,EAAEtJ,KAAK,CAACuJ,gBAAgB,IAAI;IAAQ,CAAE,CAC9D,EACA,CAAC,CAACvJ,KAAK,CAAC6C,SAAS,iBAAI/D,IAAA,CAACN,SAAS,IAAE,CAAC;EAAA,CAEjC,CAAC;AAEf,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createContext","forwardRef","useContext","useEffect","useImperativeHandle","useMemo","useRef","useState","Platform","View","WebView","Geolocation","KeepAwake","MapPlaceholder","MapSelectPoint","NavigatorHud","NavigatorRecenterButton","NavigatorVoiceControl","resolveNavigatorChromeTheme","keysToClipUrls","volumeLevelToGain","NavigatorVoicePlayer","navigatorUiStrings","useNavigatorVoice","loadResources","getNativeMapHtmlUri","MAP_HTML","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","MapViewContext","useMapViewContext","ctx","Error","getBoundsFromCoords","coords","length","minLng","maxLng","minLat","maxLat","lng","lat","toWebMarkerParams","props","uniqueId","latitude","longitude","color","iconUrl","iconWidth","iconHeight","html","toWebPolylineParams","coordinates","width","toWebPolygonParams","fillColor","fillOpacity","strokeColor","strokeOpacity","strokeWidth","toWebRemoveParams","NAVIGATOR_GPS_FORWARD_MIN_MS","MapView","ref","webViewRef","inited","setInited","initedRef","current","hudState","setHudState","voicePlayerRef","voiceSupported","navigator","navigatorLang","voice","navigatorVoiceUrl","undefined","chromeTheme","navigatorChrome","navigatorStrings","setVolume","volumeLevel","handleNavigatorVoice","params","player","action","stop","voiceEnabled","manifest","clipBaseUrl","urls","keys","playUrls","coordsInMapRef","markersClickHandlers","mapSelectPointRef","performanceMode","OS","webViewSource","developerLocalhostBundleUrl","uri","useNativeMapHtml","fallbackPixelRatio","sendToWebView","message","__DEV__","console","log","postMessage","JSON","stringify","sendToWebViewRef","initMap","mapStyle","mapStyleText","parse","initParams","zoomEnabled","scrollEnabled","center","zoom","minZoom","maxZoom","antialias","crossSourceCollisions","fadeDuration","pixelRatio","simplifyStyle","aggressiveSimplifyStyle","maxPitch","renderWorldCopies","turboWhileMoving","debugMode","graphhopperUrl","navigatorProfile","function","updateMarkerClickHandler","propsMarker","onPress","addMarker","ignoreFitBounds","scheduleAutoFitBounds","removeMarker","addPolyline","propsPolyline","removePolyline","addPolygon","propsPolygon","removePolygon","autoFitBoundsTimeoutRef","autoFitBounds","clearTimeout","setTimeout","fitBounds","fitBoundsPadding","Object","values","flat","bounds","padding","duration","fitBoundsDuration","flyTo","flyToDuration","setNavigatorPoint","advanceNavigatorInstruction","setNavigatorPosition","accuracy","Number","isFinite","pickNavigatorPosition","recenterNavigatorCamera","lastPropsRef","updateProps","then","onReceiveMessageFromWebView","data","msg","type","event","up","onMoveStart","onMoveEnd","down","onZoomStart","onZoomEnd","onIdle","onMapError","onNavigatorRouteSet","onNavigatorInstruction","onNavigatorPositionSet","onMapLiteError","onReady","handler","e","warn","lastForwardedAt","watchId","watchPosition","position","now","Date","error","enableHighAccuracy","interval","fastestInterval","distanceFilter","maximumAge","clearWatch","style","children","Provider","value","flex","backgroundColor","originWhitelist","source","onMessage","nativeEvent","javaScriptEnabled","domStorageEnabled","showSelectPoint","pointerEvents","justifyContent","alignItems","top","left","height","selectPointColor","selectPointBackgroundColor","state","theme","pickHint","accessibilityLabel","recenterAria","strings","catalog","selectedDir","onSelectVoice","selectVoice","onSelectVolume","selectVolume","onDisable","disableVoice","initialVolume","placeholderTheme"],"sourceRoot":"../../../src","sources":["components/MapView.tsx"],"mappings":";;AAAA,SACEA,aAAa,EACbC,UAAU,EACVC,UAAU,EACVC,SAAS,EACTC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AAEd,SACEC,QAAQ,EAERC,IAAI,QAEC,cAAc;AACrB,SAASC,OAAO,QAAQ,sBAAsB;AAE9C,OAAOC,WAAW,MAAM,qCAAqC;AAC7D,OAAOC,SAAS,MAAM,mCAAmC;AAEzD,OAAOC,cAAc,MAAM,qBAAkB;AAC7C,OAAOC,cAAc,MAAmC,qBAAkB;AAC1E,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,uBAAuB,QAAQ,8BAA2B;AACnE,SAASC,qBAAqB,QAAQ,4BAAyB;AAC/D,SAASC,2BAA2B,QAAQ,2BAAwB;AACpE,SAASC,cAAc,EAAEC,iBAAiB,QAAQ,4BAAyB;AAC3E,SAASC,oBAAoB,QAAsC,2BAAwB;AAC3F,SAASC,kBAAkB,QAAQ,4BAAyB;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