react-native-maplibre-lite 0.1.3 → 0.1.5

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 (73) hide show
  1. package/README.md +133 -45
  2. package/lib/module/components/MapView.js +58 -21
  3. package/lib/module/components/MapView.js.map +1 -1
  4. package/lib/module/components/webMapBuild.js +4 -0
  5. package/lib/module/components/webMapBuild.js.map +1 -0
  6. package/lib/typescript/src/components/MapView.d.ts +29 -2
  7. package/lib/typescript/src/components/MapView.d.ts.map +1 -1
  8. package/lib/typescript/src/components/types.d.ts +30 -5
  9. package/lib/typescript/src/components/types.d.ts.map +1 -1
  10. package/lib/typescript/src/components/webMapBuild.d.ts +2 -0
  11. package/lib/typescript/src/components/webMapBuild.d.ts.map +1 -0
  12. package/lib/typescript/src/index.d.ts +1 -1
  13. package/lib/typescript/src/index.d.ts.map +1 -1
  14. package/package.json +3 -2
  15. package/src/components/MapView.tsx +90 -48
  16. package/src/components/types.ts +37 -6
  17. package/src/components/webMapBuild.ts +4 -0
  18. package/src/index.tsx +13 -1
  19. package/lib/module/components/webContent.js +0 -159
  20. package/lib/module/components/webContent.js.map +0 -1
  21. package/lib/module/components/webFunctions/addMarkerWeb.js +0 -83
  22. package/lib/module/components/webFunctions/addMarkerWeb.js.map +0 -1
  23. package/lib/module/components/webFunctions/addPolygonWeb.js +0 -62
  24. package/lib/module/components/webFunctions/addPolygonWeb.js.map +0 -1
  25. package/lib/module/components/webFunctions/addPolylineWeb.js +0 -48
  26. package/lib/module/components/webFunctions/addPolylineWeb.js.map +0 -1
  27. package/lib/module/components/webFunctions/fitBoundsWeb.js +0 -15
  28. package/lib/module/components/webFunctions/fitBoundsWeb.js.map +0 -1
  29. package/lib/module/components/webFunctions/flyToWeb.js +0 -14
  30. package/lib/module/components/webFunctions/flyToWeb.js.map +0 -1
  31. package/lib/module/components/webFunctions/initWeb.js +0 -188
  32. package/lib/module/components/webFunctions/initWeb.js.map +0 -1
  33. package/lib/module/components/webFunctions/removeMarkerWeb.js +0 -12
  34. package/lib/module/components/webFunctions/removeMarkerWeb.js.map +0 -1
  35. package/lib/module/components/webFunctions/removePolygonWeb.js +0 -22
  36. package/lib/module/components/webFunctions/removePolygonWeb.js.map +0 -1
  37. package/lib/module/components/webFunctions/removePolylineWeb.js +0 -17
  38. package/lib/module/components/webFunctions/removePolylineWeb.js.map +0 -1
  39. package/lib/module/components/webFunctions/updateWeb.js +0 -78
  40. package/lib/module/components/webFunctions/updateWeb.js.map +0 -1
  41. package/lib/typescript/src/components/webContent.d.ts +0 -3
  42. package/lib/typescript/src/components/webContent.d.ts.map +0 -1
  43. package/lib/typescript/src/components/webFunctions/addMarkerWeb.d.ts +0 -3
  44. package/lib/typescript/src/components/webFunctions/addMarkerWeb.d.ts.map +0 -1
  45. package/lib/typescript/src/components/webFunctions/addPolygonWeb.d.ts +0 -3
  46. package/lib/typescript/src/components/webFunctions/addPolygonWeb.d.ts.map +0 -1
  47. package/lib/typescript/src/components/webFunctions/addPolylineWeb.d.ts +0 -3
  48. package/lib/typescript/src/components/webFunctions/addPolylineWeb.d.ts.map +0 -1
  49. package/lib/typescript/src/components/webFunctions/fitBoundsWeb.d.ts +0 -3
  50. package/lib/typescript/src/components/webFunctions/fitBoundsWeb.d.ts.map +0 -1
  51. package/lib/typescript/src/components/webFunctions/flyToWeb.d.ts +0 -2
  52. package/lib/typescript/src/components/webFunctions/flyToWeb.d.ts.map +0 -1
  53. package/lib/typescript/src/components/webFunctions/initWeb.d.ts +0 -3
  54. package/lib/typescript/src/components/webFunctions/initWeb.d.ts.map +0 -1
  55. package/lib/typescript/src/components/webFunctions/removeMarkerWeb.d.ts +0 -3
  56. package/lib/typescript/src/components/webFunctions/removeMarkerWeb.d.ts.map +0 -1
  57. package/lib/typescript/src/components/webFunctions/removePolygonWeb.d.ts +0 -3
  58. package/lib/typescript/src/components/webFunctions/removePolygonWeb.d.ts.map +0 -1
  59. package/lib/typescript/src/components/webFunctions/removePolylineWeb.d.ts +0 -3
  60. package/lib/typescript/src/components/webFunctions/removePolylineWeb.d.ts.map +0 -1
  61. package/lib/typescript/src/components/webFunctions/updateWeb.d.ts +0 -3
  62. package/lib/typescript/src/components/webFunctions/updateWeb.d.ts.map +0 -1
  63. package/src/components/webContent.ts +0 -163
  64. package/src/components/webFunctions/addMarkerWeb.ts +0 -80
  65. package/src/components/webFunctions/addPolygonWeb.ts +0 -59
  66. package/src/components/webFunctions/addPolylineWeb.ts +0 -45
  67. package/src/components/webFunctions/fitBoundsWeb.ts +0 -12
  68. package/src/components/webFunctions/flyToWeb.ts +0 -11
  69. package/src/components/webFunctions/initWeb.ts +0 -185
  70. package/src/components/webFunctions/removeMarkerWeb.ts +0 -9
  71. package/src/components/webFunctions/removePolygonWeb.ts +0 -19
  72. package/src/components/webFunctions/removePolylineWeb.ts +0 -14
  73. package/src/components/webFunctions/updateWeb.ts +0 -75
package/README.md CHANGED
@@ -2,22 +2,27 @@
2
2
 
3
3
  Lightweight MapLibre for React Native powered by `WebView`.
4
4
 
5
- `react-native-maplibre-lite` renders MapLibre GL JS inside a React Native app with a small, practical API:
5
+ `react-native-maplibre-lite` renders a bundled MapLibre GL JS runtime inside a React Native app and exposes a small React API:
6
6
 
7
7
  - `MapView`
8
8
  - `Marker`
9
9
  - `Polyline`
10
10
  - `Polygon`
11
11
 
12
- It is designed for teams that want a simple MapLibre integration without native SDK setup complexity.
12
+ It is designed for teams that want a practical MapLibre integration without native SDK setup complexity.
13
13
 
14
14
  ## Features
15
15
 
16
16
  - MapLibre GL JS in a React Native component
17
- - Declarative overlays (`Marker`, `Polyline`, `Polygon`)
18
- - Imperative `fitBounds()` via ref
19
- - Built-in JS/CSS asset caching using `AsyncStorage`
20
- - Android performance controls (`performanceMode`, `turboWhileMoving`, `pixelRatio`)
17
+ - Declarative overlays: `Marker`, `Polyline`, `Polygon`
18
+ - Built-in PMTiles protocol support
19
+ - Built-in 3D building extrusion for compatible vector styles
20
+ - Imperative camera methods: `fitBounds()` and `flyTo()`
21
+ - Optional `autoFitBounds` for markers, polylines and polygons
22
+ - Custom marker icons or marker HTML
23
+ - Optional navigator mode with GraphHopper routes, HUD, route snapping and rerouting
24
+ - Map style caching through `AsyncStorage`
25
+ - Android performance controls: `performanceMode`, `turboWhileMoving`, `pixelRatio`
21
26
 
22
27
  ## Installation
23
28
 
@@ -35,7 +40,7 @@ yarn add react-native-maplibre-lite react-native-webview @react-native-async-sto
35
40
 
36
41
  ```tsx
37
42
  import React, { useRef } from 'react';
38
- import { View } from 'react-native';
43
+ import { Button, View } from 'react-native';
39
44
  import MapView, {
40
45
  Marker,
41
46
  Polyline,
@@ -43,12 +48,6 @@ import MapView, {
43
48
  type MapViewRef,
44
49
  } from 'react-native-maplibre-lite';
45
50
 
46
- const SOURCES = {
47
- maplibreJS: 'https://unpkg.com/maplibre-gl@4.7.1/dist/maplibre-gl.js',
48
- maplibreCSS: 'https://unpkg.com/maplibre-gl@4.7.1/dist/maplibre-gl.css',
49
- pmtilesJS: 'https://unpkg.com/pmtiles@3.0.7/dist/pmtiles.js',
50
- };
51
-
52
51
  export function MapScreen() {
53
52
  const mapRef = useRef<MapViewRef>(null);
54
53
 
@@ -57,19 +56,22 @@ export function MapScreen() {
57
56
  <MapView
58
57
  ref={mapRef}
59
58
  style={{ flex: 1 }}
60
- theme="light"
59
+ placeholderTheme="light"
61
60
  center={[37.6173, 55.7558]}
62
61
  zoom={11}
63
62
  mapStyle="https://demotiles.maplibre.org/style.json"
64
63
  zoomEnabled
65
64
  scrollEnabled
66
- sources={SOURCES}
65
+ autoFitBounds
66
+ fitBoundsPadding={48}
67
+ onReady={() => console.log('map ready')}
67
68
  >
68
69
  <Marker
69
70
  uniqueId="m-1"
70
71
  latitude={55.7558}
71
72
  longitude={37.6173}
72
73
  color="#1D4ED8"
74
+ onPress={() => console.log('marker pressed')}
73
75
  />
74
76
 
75
77
  <Polyline
@@ -90,51 +92,121 @@ export function MapScreen() {
90
92
  strokeColor="#2563EB"
91
93
  strokeWidth={2}
92
94
  coordinates={[
93
- [37.60, 55.75],
95
+ [37.6, 55.75],
94
96
  [37.62, 55.77],
95
97
  [37.66, 55.75],
96
- [37.60, 55.75],
98
+ [37.6, 55.75],
97
99
  ]}
98
100
  />
99
101
  </MapView>
102
+
103
+ <Button
104
+ title="Fly to Moscow center"
105
+ onPress={() => mapRef.current?.flyTo([37.6173, 55.7558], 14)}
106
+ />
100
107
  </View>
101
108
  );
102
109
  }
103
110
  ```
104
111
 
112
+ Coordinates use `[longitude, latitude]`, the same order as GeoJSON and GraphHopper. Marker props still accept `latitude` and `longitude` separately.
113
+
114
+ ## Navigator Mode
115
+
116
+ Navigator mode adds a route line, a current-position arrow, a driving HUD and GraphHopper-based route recalculation.
117
+
118
+ ```tsx
119
+ import React, { useRef } from 'react';
120
+ import { Button, View } from 'react-native';
121
+ import MapView, { type MapViewRef } from 'react-native-maplibre-lite';
122
+
123
+ export function NavigatorScreen() {
124
+ const mapRef = useRef<MapViewRef>(null);
125
+
126
+ return (
127
+ <View style={{ flex: 1 }}>
128
+ <MapView
129
+ ref={mapRef}
130
+ style={{ flex: 1 }}
131
+ center={[37.6173, 55.7558]}
132
+ zoom={17}
133
+ mapStyle="https://example.com/style.json"
134
+ navigator
135
+ graphhopperUrl="https://graphhopper.example.com"
136
+ navigatorLang="ru"
137
+ zoomEnabled
138
+ scrollEnabled
139
+ onNavigatorRouteSet={(route) => console.log('route', route)}
140
+ onNavigatorInstruction={(instruction) =>
141
+ console.log('next instruction', instruction)
142
+ }
143
+ onNavigatorPositionSet={(position) => console.log('position', position)}
144
+ onMapLiteError={(error) => console.warn(error)}
145
+ />
146
+
147
+ <Button
148
+ title="Build route"
149
+ onPress={() => mapRef.current?.setNavigatorPoint(55.76, 37.64)}
150
+ />
151
+ </View>
152
+ );
153
+ }
154
+ ```
155
+
156
+ `graphhopperUrl` is the base URL without the required `/route` suffix. The plugin sends `POST {graphhopperUrl}/route` with `points_encoded: false`, `instructions: true`, and `locale` from `navigatorLang`.
157
+
158
+ 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.
159
+
105
160
  ## API
106
161
 
107
162
  ### `MapView` props
108
163
 
109
164
  | Prop | Type | Required | Description |
110
165
  | --- | --- | --- | --- |
111
- | `theme` | `'light' \| 'dark'` | yes | Placeholder theme before map init |
112
166
  | `center` | `[number, number]` | yes | Initial map center as `[lng, lat]` |
113
167
  | `zoom` | `number` | yes | Initial zoom level |
114
- | `mapStyle` | `string` | yes | MapLibre style URL |
168
+ | `mapStyle` | `string` | yes | MapLibre style URL. The style JSON is fetched and cached with `AsyncStorage` |
115
169
  | `style` | `StyleProp<ViewStyle>` | yes | Container style |
116
- | `sources` | `{ maplibreJS; maplibreCSS; pmtilesJS }` | yes | URLs for MapLibre/PMTiles runtime assets |
170
+ | `placeholderTheme` | `'light' \| 'dark'` | no | Placeholder theme before map init. Defaults to `light` |
117
171
  | `minZoom` | `number` | no | Minimum zoom |
118
172
  | `maxZoom` | `number` | no | Maximum zoom |
119
- | `zoomEnabled` | `boolean` | no | Enable zoom gestures |
120
- | `scrollEnabled` | `boolean` | no | Enable pan/scroll gestures |
173
+ | `zoomEnabled` | `boolean` | no | Enable double-tap zoom, pinch zoom and rotation |
174
+ | `scrollEnabled` | `boolean` | no | Enable pan and scroll gestures |
121
175
  | `showSelectPoint` | `boolean` | no | Show animated center pointer |
122
176
  | `selectPointColor` | `string` | no | Center pointer color |
123
177
  | `selectPointBackgroundColor` | `string` | no | Center pointer background |
178
+ | `autoFitBounds` | `boolean` | no | Automatically fit camera to visible overlays after overlay changes |
179
+ | `fitBoundsPadding` | `number` | no | Padding for `fitBounds()` and `autoFitBounds`. Defaults to `40` |
180
+ | `fitBoundsDuration` | `number` | no | Animation duration for `fitBounds()`. Defaults to `500` |
181
+ | `flyToDuration` | `number` | no | Animation duration for `flyTo()`. Defaults to `500` |
182
+ | `performanceMode` | `'quality' \| 'balanced' \| 'performance'` | no | Rendering quality/performance profile |
183
+ | `pixelRatio` | `number` | no | Manual renderer pixel ratio override |
184
+ | `turboWhileMoving` | `boolean` | no | Hide polyline/polygon overlays while map moves |
185
+ | `debugMode` | `boolean` | no | Enables extra WebView-side debug alerts/logging |
186
+ | `navigator` | `boolean` | no | Enable navigator mode |
187
+ | `graphhopperUrl` | `string` | no | Base GraphHopper URL for navigator routes |
188
+ | `navigatorLang` | `'ru' \| 'en'` | no | Navigator HUD and instruction language. Defaults to `ru` |
189
+ | `onReady` | `() => void` | no | Called after the WebView map is initialized |
124
190
  | `onMoveStart` | `(params) => void` | no | `movestart` event |
125
191
  | `onMoveEnd` | `(params) => void` | no | `moveend` event |
126
192
  | `onZoomStart` | `(params) => void` | no | `zoomstart` event |
127
193
  | `onZoomEnd` | `(params) => void` | no | `zoomend` event |
128
194
  | `onIdle` | `(params) => void` | no | `idle` event |
129
- | `performanceMode` | `'quality' \| 'balanced' \| 'performance'` | no | Rendering quality/performance profile |
130
- | `pixelRatio` | `number` | no | Manual renderer pixel ratio override |
131
- | `turboWhileMoving` | `boolean` | no | Hide polyline/polygon overlays while map moves |
195
+ | `onNavigatorRouteSet` | `(params) => void` | no | Called after navigator route creation |
196
+ | `onNavigatorInstruction` | `(params) => void` | no | Called when a navigator instruction is advanced |
197
+ | `onNavigatorPositionSet` | `(params) => void` | no | Called after navigator position update/snap/reroute |
198
+ | `onMapLiteError` | `(error) => void` | no | WebView command error callback |
132
199
 
133
200
  ### `MapView` ref
134
201
 
135
202
  | Method | Description |
136
203
  | --- | --- |
137
- | `fitBounds()` | Fits camera to all current markers/polylines/polygons |
204
+ | `fitBounds()` | Fits camera to current markers, polylines and polygons |
205
+ | `flyTo(center, zoom)` | Animates camera to `[lng, lat]` and zoom |
206
+ | `setNavigatorPoint(latitude, longitude)` | Builds a navigator route to the destination. Requires `navigator` |
207
+ | `advanceNavigatorInstruction()` | Advances to the next navigator instruction |
208
+ | `setNavigatorPosition(latitude, longitude)` | Updates current navigator position from GPS or another source |
209
+ | `pickNavigatorPosition()` | Dev helper: next map tap sets current navigator position |
138
210
 
139
211
  ### `Marker` props
140
212
 
@@ -144,31 +216,35 @@ export function MapScreen() {
144
216
  | `latitude` | `number` | yes | Marker latitude |
145
217
  | `longitude` | `number` | yes | Marker longitude |
146
218
  | `onPress` | `() => void` | no | Press callback |
147
- | `color` | `string` | no | Default marker color |
219
+ | `ignoreFitBounds` | `boolean` | no | Exclude marker from `fitBounds()` and `autoFitBounds` |
220
+ | `color` | `string` | no | Default MapLibre marker color |
148
221
  | `iconUrl` | `string` | no | Custom marker image URL |
149
222
  | `iconWidth` | `number` | no | Custom icon width |
150
223
  | `iconHeight` | `number` | no | Custom icon height |
224
+ | `html` | `string` | no | Custom marker HTML. If provided, it takes priority over `iconUrl` and `color` |
151
225
 
152
226
  ### `Polyline` props
153
227
 
154
- | Prop | Type | Required |
155
- | --- | --- | --- |
156
- | `uniqueId` | `string` | yes |
157
- | `coordinates` | `[number, number][]` | yes |
158
- | `color` | `string` | no |
159
- | `width` | `number` | no |
228
+ | Prop | Type | Required | Description |
229
+ | --- | --- | --- | --- |
230
+ | `uniqueId` | `string` | yes | Unique overlay id |
231
+ | `coordinates` | `[number, number][]` | yes | Line coordinates as `[lng, lat]` |
232
+ | `ignoreFitBounds` | `boolean` | no | Exclude line from `fitBounds()` and `autoFitBounds` |
233
+ | `color` | `string` | no | Line color. Defaults to `#000000` |
234
+ | `width` | `number` | no | Line width. Defaults to `4` |
160
235
 
161
236
  ### `Polygon` props
162
237
 
163
- | Prop | Type | Required |
164
- | --- | --- | --- |
165
- | `uniqueId` | `string` | yes |
166
- | `coordinates` | `[number, number][]` | yes |
167
- | `fillColor` | `string` | no |
168
- | `fillOpacity` | `number` | no |
169
- | `strokeColor` | `string` | no |
170
- | `strokeOpacity` | `number` | no |
171
- | `strokeWidth` | `number` | no |
238
+ | Prop | Type | Required | Description |
239
+ | --- | --- | --- | --- |
240
+ | `uniqueId` | `string` | yes | Unique overlay id |
241
+ | `coordinates` | `[number, number][]` | yes | Polygon ring coordinates as `[lng, lat]` |
242
+ | `ignoreFitBounds` | `boolean` | no | Exclude polygon from `fitBounds()` and `autoFitBounds` |
243
+ | `fillColor` | `string` | no | Fill color |
244
+ | `fillOpacity` | `number` | no | Fill opacity |
245
+ | `strokeColor` | `string` | no | Stroke color |
246
+ | `strokeOpacity` | `number` | no | Stroke opacity |
247
+ | `strokeWidth` | `number` | no | Stroke width |
172
248
 
173
249
  ## Performance Tuning (Android)
174
250
 
@@ -186,13 +262,25 @@ Profiles:
186
262
 
187
263
  - `quality`: best visual quality
188
264
  - `balanced`: default on Android; better FPS with moderate quality reduction
189
- - `performance`: aggressive optimizations (lower renderer resolution, simplified style, reduced map effects)
265
+ - `performance`: aggressive optimizations, lower renderer resolution, simplified style and reduced map effects
190
266
 
191
267
  Tips:
192
268
 
193
- - If you still see frame drops, pass a lower `pixelRatio` (example: `0.75`)
269
+ - If you still see frame drops, pass a lower `pixelRatio`, for example `0.75`
194
270
  - Keep number of simultaneously visible overlays moderate
195
- - Prefer simpler map styles (fewer labels/3D layers)
271
+ - Prefer simpler map styles with fewer labels and 3D layers
272
+
273
+ ## Web Bundle Development
274
+
275
+ The WebView runtime is generated from `webProject` and committed as `src/components/webMapBuild.ts`.
276
+
277
+ ```bash
278
+ cd webProject
279
+ npm install
280
+ npm run build
281
+ ```
282
+
283
+ `npm run build` runs Vite and then `webProject/scripts/inlineHtml.mjs`, which writes the single-file HTML bundle back into `src/components/webMapBuild.ts`.
196
284
 
197
285
  ## Contributing
198
286
 
@@ -6,17 +6,7 @@ import { WebView } from 'react-native-webview';
6
6
  import MapPlaceholder from "./MapPlaceholder.js";
7
7
  import MapSelectPoint from "./MapSelectPoint.js";
8
8
  import { loadResources } from "./utils.js";
9
- import { maplibreHtmlMap } from "./webContent.js";
10
- import addMarkerWeb from "./webFunctions/addMarkerWeb.js";
11
- import addPolygonWeb from "./webFunctions/addPolygonWeb.js";
12
- import addPolylineWeb from "./webFunctions/addPolylineWeb.js";
13
- import fitBoundsWeb from "./webFunctions/fitBoundsWeb.js";
14
- import { flyToWeb } from "./webFunctions/flyToWeb.js";
15
- import initWeb from "./webFunctions/initWeb.js";
16
- import removeMarkerWeb from "./webFunctions/removeMarkerWeb.js";
17
- import removePolygonWeb from "./webFunctions/removePolygonWeb.js";
18
- import removePolylineWeb from "./webFunctions/removePolylineWeb.js";
19
- import updateWeb from "./webFunctions/updateWeb.js";
9
+ import { MAP_HTML } from "./webMapBuild.js";
20
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
11
  const MapViewContext = /*#__PURE__*/createContext(null);
22
12
  export const useMapViewContext = () => {
@@ -24,7 +14,6 @@ export const useMapViewContext = () => {
24
14
  if (!ctx) throw new Error('useMapViewContext must be used within <MapView>');
25
15
  return ctx;
26
16
  };
27
- const webFunctionsString = [initWeb, addMarkerWeb, removeMarkerWeb, addPolylineWeb, removePolylineWeb, addPolygonWeb, removePolygonWeb, fitBoundsWeb, flyToWeb, updateWeb].join('\n');
28
17
  const getBoundsFromCoords = coords => {
29
18
  if (!coords.length) {
30
19
  throw new Error('Empty coordinates array');
@@ -44,7 +33,6 @@ const getBoundsFromCoords = coords => {
44
33
  export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
45
34
  const webViewRef = useRef(null);
46
35
  const [inited, setInited] = useState(false);
47
- const [html, setHtml] = useState('');
48
36
  const coordsInMapRef = useRef({});
49
37
  const markersClickHandlers = useRef({});
50
38
  const mapSelectPointRef = useRef(null);
@@ -81,7 +69,11 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
81
69
  aggressiveSimplifyStyle: performanceMode === 'performance',
82
70
  maxPitch: performanceMode === 'performance' ? 0 : 45,
83
71
  renderWorldCopies: performanceMode === 'quality',
84
- turboWhileMoving: props.turboWhileMoving ?? performanceMode === 'performance'
72
+ turboWhileMoving: props.turboWhileMoving ?? performanceMode === 'performance',
73
+ debugMode: props.debugMode ?? false,
74
+ navigator: props.navigator === true,
75
+ graphhopperUrl: props.graphhopperUrl,
76
+ navigatorLang: props.navigatorLang
85
77
  }
86
78
  });
87
79
  };
@@ -184,9 +176,43 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
184
176
  }
185
177
  });
186
178
  };
179
+ const setNavigatorPoint = (latitude, longitude) => {
180
+ sendToWebView({
181
+ function: 'setNavigatorPoint',
182
+ params: {
183
+ latitude,
184
+ longitude
185
+ }
186
+ });
187
+ };
188
+ const advanceNavigatorInstruction = () => {
189
+ sendToWebView({
190
+ function: 'advanceNavigatorInstruction',
191
+ params: {}
192
+ });
193
+ };
194
+ const setNavigatorPosition = (latitude, longitude) => {
195
+ sendToWebView({
196
+ function: 'setNavigatorPosition',
197
+ params: {
198
+ latitude,
199
+ longitude
200
+ }
201
+ });
202
+ };
203
+ const pickNavigatorPosition = () => {
204
+ sendToWebView({
205
+ function: 'pickNavigatorPosition',
206
+ params: {}
207
+ });
208
+ };
187
209
  useImperativeHandle(ref, () => ({
188
210
  fitBounds,
189
- flyTo
211
+ flyTo,
212
+ setNavigatorPoint,
213
+ advanceNavigatorInstruction,
214
+ setNavigatorPosition,
215
+ pickNavigatorPosition
190
216
  }), [fitBounds]);
191
217
  const lastPropsRef = useRef(props);
192
218
  useEffect(() => {
@@ -214,10 +240,6 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
214
240
  });
215
241
  }
216
242
  }, [props.minZoom, props.maxZoom, props.zoomEnabled, props.scrollEnabled, props.mapStyle]);
217
- useEffect(() => {
218
- if (html) return;
219
- maplibreHtmlMap(webFunctionsString, props.sources, props.debugMode ?? false).then(setHtml);
220
- }, []);
221
243
  const onReceiveMessageFromWebView = data => {
222
244
  try {
223
245
  const msg = JSON.parse(data);
@@ -243,9 +265,22 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
243
265
  case 'idle':
244
266
  props.onIdle?.(msg.params);
245
267
  break;
268
+ case 'navigatorRouteSet':
269
+ props.onNavigatorRouteSet?.(msg.params);
270
+ break;
271
+ case 'navigatorInstruction':
272
+ props.onNavigatorInstruction?.(msg.params);
273
+ break;
274
+ case 'navigatorPositionSet':
275
+ props.onNavigatorPositionSet?.(msg.params);
276
+ break;
246
277
  }
247
278
  return;
248
279
  }
280
+ if (msg.type === 'error' && msg.data) {
281
+ props.onMapLiteError?.(msg.data);
282
+ return;
283
+ }
249
284
  if (msg.type === 'inited') {
250
285
  props.onReady?.();
251
286
  setInited(true);
@@ -286,8 +321,10 @@ export const MapView = /*#__PURE__*/forwardRef((props, ref) => {
286
321
  backgroundColor: 'transparent'
287
322
  },
288
323
  originWhitelist: ['*'],
289
- source: {
290
- html
324
+ source: !!props.developerLocalhostBundleUrl ? {
325
+ uri: props.developerLocalhostBundleUrl
326
+ } : {
327
+ html: MAP_HTML
291
328
  },
292
329
  onMessage: event => {
293
330
  onReceiveMessageFromWebView(event.nativeEvent.data);
@@ -1 +1 @@
1
- {"version":3,"names":["createContext","forwardRef","useContext","useEffect","useImperativeHandle","useRef","useState","Platform","View","WebView","MapPlaceholder","MapSelectPoint","loadResources","maplibreHtmlMap","addMarkerWeb","addPolygonWeb","addPolylineWeb","fitBoundsWeb","flyToWeb","initWeb","removeMarkerWeb","removePolygonWeb","removePolylineWeb","updateWeb","jsx","_jsx","jsxs","_jsxs","MapViewContext","useMapViewContext","ctx","Error","webFunctionsString","join","getBoundsFromCoords","coords","length","minLng","maxLng","minLat","maxLat","lng","lat","MapView","props","ref","webViewRef","inited","setInited","html","setHtml","coordsInMapRef","markersClickHandlers","mapSelectPointRef","performanceMode","OS","fallbackPixelRatio","undefined","sendToWebView","message","__DEV__","console","log","current","postMessage","JSON","stringify","initMap","mapStyle","mapStyleText","parse","function","params","zoomEnabled","scrollEnabled","center","zoom","minZoom","maxZoom","antialias","crossSourceCollisions","fadeDuration","pixelRatio","simplifyStyle","aggressiveSimplifyStyle","maxPitch","renderWorldCopies","turboWhileMoving","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","lastPropsRef","updateProps","keys","sources","debugMode","then","onReceiveMessageFromWebView","data","msg","type","event","up","onMoveStart","onMoveEnd","down","onZoomStart","onZoomEnd","onIdle","onReady","handler","e","warn","style","children","Provider","value","flex","backgroundColor","originWhitelist","source","onMessage","nativeEvent","javaScriptEnabled","domStorageEnabled","showSelectPoint","pointerEvents","justifyContent","alignItems","position","top","left","width","height","color","selectPointColor","selectPointBackgroundColor","theme","placeholderTheme"],"sourceRoot":"../../../src","sources":["components/MapView.tsx"],"mappings":";;AAAA,SACIA,aAAa,EACbC,UAAU,EACVC,UAAU,EACVC,SAAS,EACTC,mBAAmB,EACnBC,MAAM,EACNC,QAAQ,QACL,OAAO;AAEd,SAEIC,QAAQ,EACRC,IAAI,QAED,cAAc;AACrB,SAASC,OAAO,QAAQ,sBAAsB;AAE9C,OAAOC,cAAc,MAAM,qBAAkB;AAC7C,OAAOC,cAAc,MAAmC,qBAAkB;AAQ1E,SAASC,aAAa,QAAQ,YAAS;AACvC,SAASC,eAAe,QAAQ,iBAAc;AAC9C,OAAOC,YAAY,MAAM,gCAA6B;AACtD,OAAOC,aAAa,MAAM,iCAA8B;AACxD,OAAOC,cAAc,MAAM,kCAA+B;AAC1D,OAAOC,YAAY,MAAM,gCAA6B;AACtD,SAASC,QAAQ,QAAQ,4BAAyB;AAClD,OAAOC,OAAO,MAAM,2BAAwB;AAC5C,OAAOC,eAAe,MAAM,mCAAgC;AAC5D,OAAOC,gBAAgB,MAAM,oCAAiC;AAC9D,OAAOC,iBAAiB,MAAM,qCAAkC;AAChE,OAAOC,SAAS,M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oB,CAAC,EACzB,CAACtH,MAAM,iBACJtB,IAAA,CAACf,cAAc;MAAC4J,KAAK,EAAE1H,KAAK,CAAC2H,gBAAgB,IAAI;IAAQ,CAAE,CAC9D;EAAA,CAEC,CAAC;AAEf,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createContext","forwardRef","useContext","useEffect","useImperativeHandle","useRef","useState","Platform","View","WebView","MapPlaceholder","MapSelectPoint","loadResources","MAP_HTML","jsx","_jsx","jsxs","_jsxs","MapViewContext","useMapViewContext","ctx","Error","getBoundsFromCoords","coords","length","minLng","maxLng","minLat","maxLat","lng","lat","MapView","props","ref","webViewRef","inited","setInited","coordsInMapRef","markersClickHandlers","mapSelectPointRef","performanceMode","OS","fallbackPixelRatio","undefined","sendToWebView","message","__DEV__","console","log","current","postMessage","JSON","stringify","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","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","style","children","Provider","value","flex","backgroundColor","originWhitelist","source","developerLocalhostBundleUrl","uri","html","onMessage","nativeEvent","javaScriptEnabled","domStorageEnabled","showSelectPoint","pointerEvents","justifyContent","alignItems","position","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,cAAc,MAAM,qBAAkB;AAC7C,OAAOC,cAAc,MAAmC,qBAAkB;AAY1E,SAASC,aAAa,QAAQ,YAAS;AACvC,SAASC,QAAQ,QAAQ,kBAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA2FzC,MAAMC,cAAc,gBAAGlB,aAAa,CAAyB,IAAI,CAAC;AAElE,OAAO,MAAMmB,iBAAiB,GAAGA,CAAA,KAAM;EACnC,MAAMC,GAAG,GAAGlB,UAAU,CAACgB,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,yBAAyB,CAAC;EAC9C;EAEA,IAAII,MAAM,GAAGF,MAAM,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC;EAC1B,IAAIG,MAAM,GAAGH,MAAM,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC;EAC1B,IAAII,MAAM,GAAGJ,MAAM,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC;EAC1B,IAAIK,MAAM,GAAGL,MAAM,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC;EAE1B,KAAK,MAAM,CAACM,GAAG,EA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