react-native-maplibre-lite 0.1.6 → 0.1.7
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 +44 -45
- package/lib/module/components/webMapBuild.js +1 -1
- package/lib/module/components/webMapBuild.js.map +1 -1
- package/lib/typescript/src/components/webMapBuild.d.ts +1 -1
- package/lib/typescript/src/components/webMapBuild.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/webMapBuild.ts +1 -1
package/README.md
CHANGED
|
@@ -19,8 +19,7 @@ It is designed for teams that want a practical MapLibre integration without nati
|
|
|
19
19
|
<img alt="react-native-maplibre-lite demo 2" src="./demo/demo2.jpeg" width="31%" />
|
|
20
20
|
|
|
21
21
|
<img alt="react-native-maplibre-lite demo 3" src="./demo/demo3.jpeg" width="31%" />
|
|
22
|
-
</p
|
|
23
|
-
|
|
22
|
+
</p
|
|
24
23
|
## Features
|
|
25
24
|
|
|
26
25
|
- MapLibre GL JS in a React Native component
|
|
@@ -173,14 +172,14 @@ Use `setNavigatorPosition(latitude, longitude)` to feed real GPS updates. The We
|
|
|
173
172
|
|
|
174
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.
|
|
175
174
|
|
|
176
|
-
| Key | Purpose
|
|
177
|
-
| --------------- |
|
|
175
|
+
| Key | Purpose |
|
|
176
|
+
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
178
177
|
| `accent` | Accent in hex (`#rgb` / `#rrggbb`): map arrow gradient and maneuver icon tile in the HUD (tile background and icon color are derived from it). |
|
|
179
|
-
| `routeLine` | Main route line color (library default was `#3b82f6`).
|
|
180
|
-
| `routeOutline` | Wide underlay for the route line (default was `#1e3a8a`).
|
|
181
|
-
| `hudBackground` | HUD panel background: any valid CSS value (`rgba(...)`, `linear-gradient(...)`, etc.).
|
|
182
|
-
| `hudForeground` | Primary text color on the HUD.
|
|
183
|
-
| `hudMuted` | Secondary text (street, summary, ETA); when this is hex, the divider tone is derived from it.
|
|
178
|
+
| `routeLine` | Main route line color (library default was `#3b82f6`). |
|
|
179
|
+
| `routeOutline` | Wide underlay for the route line (default was `#1e3a8a`). |
|
|
180
|
+
| `hudBackground` | HUD panel background: any valid CSS value (`rgba(...)`, `linear-gradient(...)`, etc.). |
|
|
181
|
+
| `hudForeground` | Primary text color on the HUD. |
|
|
182
|
+
| `hudMuted` | Secondary text (street, summary, ETA); when this is hex, the divider tone is derived from it. |
|
|
184
183
|
|
|
185
184
|
Speed limit styling on the HUD is not configurable.
|
|
186
185
|
|
|
@@ -188,43 +187,43 @@ Speed limit styling on the HUD is not configurable.
|
|
|
188
187
|
|
|
189
188
|
### `MapView` props
|
|
190
189
|
|
|
191
|
-
| Prop | Type | Required | Description
|
|
192
|
-
| ---------------------------- | ------------------------------------------ | -------- |
|
|
193
|
-
| `center` | `[number, number]` | yes | Initial map center as `[lng, lat]`
|
|
194
|
-
| `zoom` | `number` | yes | Initial zoom level
|
|
195
|
-
| `mapStyle` | `string` | yes | MapLibre style URL. The style JSON is fetched and cached with `AsyncStorage`
|
|
196
|
-
| `style` | `StyleProp<ViewStyle>` | yes | Container style
|
|
197
|
-
| `placeholderTheme` | `'light' \| 'dark'` | no | Placeholder theme before map init. Defaults to `light`
|
|
198
|
-
| `minZoom` | `number` | no | Minimum zoom
|
|
199
|
-
| `maxZoom` | `number` | no | Maximum zoom
|
|
200
|
-
| `zoomEnabled` | `boolean` | no | Enable double-tap zoom, pinch zoom and rotation
|
|
201
|
-
| `scrollEnabled` | `boolean` | no | Enable pan and scroll gestures
|
|
202
|
-
| `showSelectPoint` | `boolean` | no | Show animated center pointer
|
|
203
|
-
| `selectPointColor` | `string` | no | Center pointer color
|
|
204
|
-
| `selectPointBackgroundColor` | `string` | no | Center pointer background
|
|
205
|
-
| `autoFitBounds` | `boolean` | no | Automatically fit camera to visible overlays after overlay changes
|
|
206
|
-
| `fitBoundsPadding` | `number` | no | Padding for `fitBounds()` and `autoFitBounds`. Defaults to `40`
|
|
207
|
-
| `fitBoundsDuration` | `number` | no | Animation duration for `fitBounds()`. Defaults to `500`
|
|
208
|
-
| `flyToDuration` | `number` | no | Animation duration for `flyTo()`. Defaults to `500`
|
|
209
|
-
| `performanceMode` | `'quality' \| 'balanced' \| 'performance'` | no | Rendering quality/performance profile
|
|
210
|
-
| `pixelRatio` | `number` | no | Manual renderer pixel ratio override
|
|
211
|
-
| `turboWhileMoving` | `boolean` | no | Hide polyline/polygon overlays while map moves
|
|
212
|
-
| `debugMode` | `boolean` | no | Enables extra WebView-side debug alerts/logging
|
|
213
|
-
| `navigator` | `boolean` | no | Enable navigator mode
|
|
214
|
-
| `graphhopperUrl` | `string` | no | Base GraphHopper URL for navigator routes
|
|
215
|
-
| `navigatorLang` | `'ru' \| 'en'` | no | Navigator HUD and instruction language. Defaults to `ru`
|
|
216
|
-
| `navigatorProfile` | `NavigatorProfile \| string` | no | GraphHopper routing `profile` (`car`, `bike`, `foot`, …). Unknown → `car`
|
|
190
|
+
| Prop | Type | Required | Description |
|
|
191
|
+
| ---------------------------- | ------------------------------------------ | -------- | -------------------------------------------------------------------------------------- |
|
|
192
|
+
| `center` | `[number, number]` | yes | Initial map center as `[lng, lat]` |
|
|
193
|
+
| `zoom` | `number` | yes | Initial zoom level |
|
|
194
|
+
| `mapStyle` | `string` | yes | MapLibre style URL. The style JSON is fetched and cached with `AsyncStorage` |
|
|
195
|
+
| `style` | `StyleProp<ViewStyle>` | yes | Container style |
|
|
196
|
+
| `placeholderTheme` | `'light' \| 'dark'` | no | Placeholder theme before map init. Defaults to `light` |
|
|
197
|
+
| `minZoom` | `number` | no | Minimum zoom |
|
|
198
|
+
| `maxZoom` | `number` | no | Maximum zoom |
|
|
199
|
+
| `zoomEnabled` | `boolean` | no | Enable double-tap zoom, pinch zoom and rotation |
|
|
200
|
+
| `scrollEnabled` | `boolean` | no | Enable pan and scroll gestures |
|
|
201
|
+
| `showSelectPoint` | `boolean` | no | Show animated center pointer |
|
|
202
|
+
| `selectPointColor` | `string` | no | Center pointer color |
|
|
203
|
+
| `selectPointBackgroundColor` | `string` | no | Center pointer background |
|
|
204
|
+
| `autoFitBounds` | `boolean` | no | Automatically fit camera to visible overlays after overlay changes |
|
|
205
|
+
| `fitBoundsPadding` | `number` | no | Padding for `fitBounds()` and `autoFitBounds`. Defaults to `40` |
|
|
206
|
+
| `fitBoundsDuration` | `number` | no | Animation duration for `fitBounds()`. Defaults to `500` |
|
|
207
|
+
| `flyToDuration` | `number` | no | Animation duration for `flyTo()`. Defaults to `500` |
|
|
208
|
+
| `performanceMode` | `'quality' \| 'balanced' \| 'performance'` | no | Rendering quality/performance profile |
|
|
209
|
+
| `pixelRatio` | `number` | no | Manual renderer pixel ratio override |
|
|
210
|
+
| `turboWhileMoving` | `boolean` | no | Hide polyline/polygon overlays while map moves |
|
|
211
|
+
| `debugMode` | `boolean` | no | Enables extra WebView-side debug alerts/logging |
|
|
212
|
+
| `navigator` | `boolean` | no | Enable navigator mode |
|
|
213
|
+
| `graphhopperUrl` | `string` | no | Base GraphHopper URL for navigator routes |
|
|
214
|
+
| `navigatorLang` | `'ru' \| 'en'` | no | Navigator HUD and instruction language. Defaults to `ru` |
|
|
215
|
+
| `navigatorProfile` | `NavigatorProfile \| string` | no | GraphHopper routing `profile` (`car`, `bike`, `foot`, …). Unknown → `car` |
|
|
217
216
|
| `navigatorChrome` | `NavigatorChromeParams` | no | Navigator colors: route line, arrow accent, HUD (see section above). Sent at init only |
|
|
218
|
-
| `onReady` | `() => void` | no | Called after the WebView map is initialized
|
|
219
|
-
| `onMoveStart` | `(params) => void` | no | `movestart` event
|
|
220
|
-
| `onMoveEnd` | `(params) => void` | no | `moveend` event
|
|
221
|
-
| `onZoomStart` | `(params) => void` | no | `zoomstart` event
|
|
222
|
-
| `onZoomEnd` | `(params) => void` | no | `zoomend` event
|
|
223
|
-
| `onIdle` | `(params) => void` | no | `idle` event
|
|
224
|
-
| `onNavigatorRouteSet` | `(params) => void` | no | Called after navigator route creation
|
|
225
|
-
| `onNavigatorInstruction` | `(params) => void` | no | Called when a navigator instruction is advanced
|
|
226
|
-
| `onNavigatorPositionSet` | `(params) => void` | no | Called after navigator position update/snap/reroute
|
|
227
|
-
| `onMapLiteError` | `(error) => void` | no | WebView command error callback
|
|
217
|
+
| `onReady` | `() => void` | no | Called after the WebView map is initialized |
|
|
218
|
+
| `onMoveStart` | `(params) => void` | no | `movestart` event |
|
|
219
|
+
| `onMoveEnd` | `(params) => void` | no | `moveend` event |
|
|
220
|
+
| `onZoomStart` | `(params) => void` | no | `zoomstart` event |
|
|
221
|
+
| `onZoomEnd` | `(params) => void` | no | `zoomend` event |
|
|
222
|
+
| `onIdle` | `(params) => void` | no | `idle` event |
|
|
223
|
+
| `onNavigatorRouteSet` | `(params) => void` | no | Called after navigator route creation |
|
|
224
|
+
| `onNavigatorInstruction` | `(params) => void` | no | Called when a navigator instruction is advanced |
|
|
225
|
+
| `onNavigatorPositionSet` | `(params) => void` | no | Called after navigator position update/snap/reroute |
|
|
226
|
+
| `onMapLiteError` | `(error) => void` | no | WebView command error callback |
|
|
228
227
|
|
|
229
228
|
### `MapView` ref
|
|
230
229
|
|