@trackunit/react-map-adapter-mapbox 0.0.14 → 0.0.15-alpha-52dc2da9c19.0
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 +20 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
# @trackunit/react-map-adapter-mapbox
|
|
2
2
|
|
|
3
|
-
**Mapbox GL JS** adapter for
|
|
3
|
+
**Mapbox GL JS** adapter for `@trackunit/react-map`: implements the shared adapter contract from `@trackunit/react-map-adapter-shared` using Mapbox GL.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @trackunit/react-map @trackunit/react-map-adapter-mapbox
|
|
9
|
+
```
|
|
6
10
|
|
|
7
11
|
## Public API
|
|
8
12
|
|
|
@@ -23,10 +27,24 @@ Important for styles: Import Mapbox GL CSS once in your app entry (for example `
|
|
|
23
27
|
import "mapbox-gl/dist/mapbox-gl.css";
|
|
24
28
|
```
|
|
25
29
|
|
|
30
|
+
## Cross-provider parity
|
|
31
|
+
|
|
32
|
+
Where Mapbox GL lacks a capability the Google Maps adapter gets natively, this adapter emulates it so consumers see identical behaviour regardless of provider. The clearest case is geodesic arcs: Google draws great-circle edges natively, while Mapbox renders Mercator straight lines, so this adapter densifies edges with `densifyGeodesicFeatures` from `@trackunit/react-map-adapter-shared` to match. Provider gaps are closed inside the adapter — never pushed up to application code.
|
|
33
|
+
|
|
26
34
|
## Dependencies
|
|
27
35
|
|
|
28
36
|
Depends on `@trackunit/react-map-adapter-shared` and Mapbox GL–related dependencies used by the renderer. It does **not** import `@trackunit/react-map` (adapters are consumed *by* the map package, not the reverse).
|
|
29
37
|
|
|
38
|
+
## Part of the `@trackunit/react-map` family
|
|
39
|
+
|
|
40
|
+
| Package | Description |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| [`@trackunit/react-map`](https://www.npmjs.com/package/@trackunit/react-map) | Core provider-agnostic map library |
|
|
43
|
+
| [`@trackunit/react-map-adapter-google`](https://www.npmjs.com/package/@trackunit/react-map-adapter-google) | Google Maps adapter |
|
|
44
|
+
| `@trackunit/react-map-adapter-mapbox` | Mapbox GL adapter (this package) |
|
|
45
|
+
| [`@trackunit/react-map-adapter-shared`](https://www.npmjs.com/package/@trackunit/react-map-adapter-shared) | Shared adapter contracts and utilities |
|
|
46
|
+
| [`@trackunit/react-map-color-utils`](https://www.npmjs.com/package/@trackunit/react-map-color-utils) | CSS color utilities for the map stack |
|
|
47
|
+
|
|
30
48
|
For more info and a full guide on Iris App SDK Development, please visit our [Developer Hub](https://developers.trackunit.com/).
|
|
31
49
|
|
|
32
50
|
## Trackunit
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-map-adapter-mapbox",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15-alpha-52dc2da9c19.0",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=24.x"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@trackunit/react-map-adapter-shared": "0.0.
|
|
11
|
-
"@trackunit/geo-json-utils": "1.14.
|
|
10
|
+
"@trackunit/react-map-adapter-shared": "0.0.28-alpha-52dc2da9c19.0",
|
|
11
|
+
"@trackunit/geo-json-utils": "1.14.47-alpha-52dc2da9c19.0",
|
|
12
12
|
"mapbox-gl": "^3.18.1",
|
|
13
13
|
"supercluster": "^8.0.1",
|
|
14
14
|
"es-toolkit": "^1.39.10",
|