@maplibre/maplibre-react-native 11.0.0-beta.3 → 11.0.0-beta.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.
- package/ios/components/map-view/MLRNMapViewModule.mm +1 -1
- package/lib/commonjs/components/layer/Layer.js +17 -62
- package/lib/commonjs/components/layer/Layer.js.map +1 -1
- package/lib/commonjs/components/user-location/UserLocation.js +21 -12
- package/lib/commonjs/components/user-location/UserLocation.js.map +1 -1
- package/lib/commonjs/components/user-location/UserLocationPuck.js +16 -16
- package/lib/commonjs/components/user-location/UserLocationPuck.js.map +1 -1
- package/lib/commonjs/components/user-location/UserLocationPuckHeading.js +8 -10
- package/lib/commonjs/components/user-location/UserLocationPuckHeading.js.map +1 -1
- package/lib/module/components/layer/Layer.js +17 -62
- package/lib/module/components/layer/Layer.js.map +1 -1
- package/lib/module/components/user-location/UserLocation.js +21 -13
- package/lib/module/components/user-location/UserLocation.js.map +1 -1
- package/lib/module/components/user-location/UserLocationPuck.js +16 -16
- package/lib/module/components/user-location/UserLocationPuck.js.map +1 -1
- package/lib/module/components/user-location/UserLocationPuckHeading.js +8 -9
- package/lib/module/components/user-location/UserLocationPuckHeading.js.map +1 -1
- package/lib/typescript/commonjs/src/components/layer/Layer.d.ts +23 -59
- package/lib/typescript/commonjs/src/components/layer/Layer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/map/Map.d.ts +4 -4
- package/lib/typescript/commonjs/src/components/map/Map.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-location/UserLocation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-location/UserLocationPuck.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-location/UserLocationPuckHeading.d.ts.map +1 -1
- package/lib/typescript/module/src/components/layer/Layer.d.ts +23 -59
- package/lib/typescript/module/src/components/layer/Layer.d.ts.map +1 -1
- package/lib/typescript/module/src/components/map/Map.d.ts +4 -4
- package/lib/typescript/module/src/components/map/Map.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-location/UserLocation.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-location/UserLocationPuck.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-location/UserLocationPuckHeading.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/layer/Layer.tsx +32 -78
- package/src/components/map/Map.tsx +4 -4
- package/src/components/user-location/UserLocation.tsx +30 -18
- package/src/components/user-location/UserLocationPuck.tsx +20 -20
- package/src/components/user-location/UserLocationPuckHeading.tsx +9 -10
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
107
107
|
reject:(RCTPromiseRejectBlock)reject {
|
|
108
108
|
CLLocationCoordinate2D coordinate =
|
|
109
|
-
CLLocationCoordinate2DMake([lngLat[
|
|
109
|
+
CLLocationCoordinate2DMake([lngLat[1] doubleValue], [lngLat[0] doubleValue]);
|
|
110
110
|
|
|
111
111
|
[self withMapView:reactTag
|
|
112
112
|
block:^(MLRNMapView *view) {
|
|
@@ -12,91 +12,59 @@ var _convertStyleSpec = require("../../utils/convertStyleSpec.js");
|
|
|
12
12
|
var _getNativeFilter = require("../../utils/getNativeFilter.js");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
let deprecationWarned = false;
|
|
16
|
+
|
|
15
17
|
/**
|
|
16
|
-
* Additional props specific to maplibre-react-native.
|
|
18
|
+
* Additional props specific to @maplibre/maplibre-react-native.
|
|
17
19
|
*/
|
|
18
20
|
|
|
19
21
|
// Utility types following react-map-gl pattern
|
|
20
22
|
// See: https://github.com/microsoft/TypeScript/issues/39556#issuecomment-656925230
|
|
21
23
|
|
|
22
24
|
/**
|
|
23
|
-
* Base layer props from style spec with optional id
|
|
24
|
-
* Matches react-map-gl's LayerProps pattern.
|
|
25
|
+
* Base layer props from style spec with optional `id`/`source`.
|
|
25
26
|
*/
|
|
26
27
|
|
|
27
28
|
/**
|
|
28
29
|
* Common props shared by all layer types.
|
|
29
30
|
*
|
|
30
|
-
* @deprecated Use `paint` and `layout` props instead of `style`.
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated Use LayerProps instead.
|
|
31
|
+
* @deprecated Use `paint` and `layout` props instead of `style`. The `style` prop be removed in v12.
|
|
35
32
|
*/
|
|
36
33
|
|
|
37
|
-
// ============================================================================
|
|
38
|
-
// DEPRECATED: Legacy type exports for backwards compatibility
|
|
39
|
-
// These will be removed in v12. Use LayerProps with paint/layout instead.
|
|
40
|
-
// ============================================================================
|
|
41
|
-
|
|
42
34
|
/**
|
|
43
|
-
* @deprecated Use LayerProps
|
|
35
|
+
* @deprecated Use `LayerProps` instead.
|
|
44
36
|
*/
|
|
45
37
|
|
|
46
38
|
/**
|
|
47
|
-
* @deprecated Use
|
|
39
|
+
* @deprecated Use `layout`/`paint` instead of `style` prop.
|
|
48
40
|
*/
|
|
49
41
|
|
|
50
42
|
/**
|
|
51
|
-
* @deprecated Use
|
|
43
|
+
* @deprecated Use `layout`/`paint` instead of `style` prop.
|
|
52
44
|
*/
|
|
53
45
|
|
|
54
46
|
/**
|
|
55
|
-
* @deprecated Use
|
|
47
|
+
* @deprecated Use `layout`/`paint` instead of `style` prop.
|
|
56
48
|
*/
|
|
57
49
|
|
|
58
50
|
/**
|
|
59
|
-
* @deprecated Use
|
|
51
|
+
* @deprecated Use `layout`/`paint` instead of `style` prop.
|
|
60
52
|
*/
|
|
61
53
|
|
|
62
54
|
/**
|
|
63
|
-
* @deprecated Use
|
|
55
|
+
* @deprecated Use `layout`/`paint` instead of `style` prop.
|
|
64
56
|
*/
|
|
65
57
|
|
|
66
58
|
/**
|
|
67
|
-
* @deprecated Use
|
|
59
|
+
* @deprecated Use `layout`/`paint` instead of `style` prop.
|
|
68
60
|
*/
|
|
69
61
|
|
|
70
62
|
/**
|
|
71
|
-
* @deprecated Use
|
|
63
|
+
* @deprecated Use `layout`/`paint` instead of `style` prop.
|
|
72
64
|
*/
|
|
73
65
|
|
|
74
66
|
/**
|
|
75
|
-
*
|
|
76
|
-
* Combines style spec LayerSpecification with MLRN-specific props.
|
|
77
|
-
*
|
|
78
|
-
* The `paint` and `layout` props come directly from LayerSpecification
|
|
79
|
-
* and use kebab-case property names per the MapLibre Style Spec.
|
|
80
|
-
*
|
|
81
|
-
* @example
|
|
82
|
-
* ```tsx
|
|
83
|
-
* // Style spec compliant (recommended)
|
|
84
|
-
* <Layer
|
|
85
|
-
* type="fill"
|
|
86
|
-
* id="parks"
|
|
87
|
-
* source="parks-source"
|
|
88
|
-
* paint={{ "fill-color": "green", "fill-opacity": 0.5 }}
|
|
89
|
-
* layout={{ "visibility": "visible" }}
|
|
90
|
-
* />
|
|
91
|
-
*
|
|
92
|
-
* // Deprecated (still works)
|
|
93
|
-
* <Layer
|
|
94
|
-
* type="fill"
|
|
95
|
-
* id="parks"
|
|
96
|
-
* source="parks-source"
|
|
97
|
-
* style={{ fillColor: "green", fillOpacity: 0.5 }}
|
|
98
|
-
* />
|
|
99
|
-
* ```
|
|
67
|
+
* @deprecated Use `layout`/`paint` instead of `style` prop.
|
|
100
68
|
*/
|
|
101
69
|
|
|
102
70
|
/**
|
|
@@ -125,14 +93,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
125
93
|
* "fill-color": ["interpolate", ["linear"], ["get", "elevation"], 0, "blue", 100, "red"],
|
|
126
94
|
* }}
|
|
127
95
|
* />
|
|
128
|
-
*
|
|
129
|
-
* // Deprecated style prop (still works but will be removed in v12)
|
|
130
|
-
* <Layer
|
|
131
|
-
* type="fill"
|
|
132
|
-
* id="parks"
|
|
133
|
-
* source="parks-source"
|
|
134
|
-
* style={{ fillColor: "green", fillOpacity: 0.5 }}
|
|
135
|
-
* />
|
|
136
96
|
* ```
|
|
137
97
|
*/
|
|
138
98
|
const Layer = ({
|
|
@@ -159,14 +119,9 @@ const Layer = ({
|
|
|
159
119
|
layout: undefined,
|
|
160
120
|
...props
|
|
161
121
|
};
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
if (paint || layout) {
|
|
166
|
-
console.warn("@maplibre/maplibre-react-native: Using both `style` and `paint`/`layout` props. " + "The `style` prop is deprecated and will be removed in v12. " + "Properties from `paint`/`layout` take precedence.");
|
|
167
|
-
} else {
|
|
168
|
-
console.warn("@maplibre/maplibre-react-native: The `style` prop is deprecated. " + "Use `paint` and `layout` props instead. Will be removed in v12.");
|
|
169
|
-
}
|
|
122
|
+
if (__DEV__ && style && !deprecationWarned) {
|
|
123
|
+
deprecationWarned = true;
|
|
124
|
+
console.warn("[@maplibre/maplibre-react-native] The `style` prop is deprecated. " + "Use `paint` and `layout` props instead. `style` will be removed in v12.");
|
|
170
125
|
}
|
|
171
126
|
|
|
172
127
|
// Merge paint/layout (new API) with style (deprecated API)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_LayerNativeComponent","_interopRequireDefault","_useFrozenId","_StyleValue","_convertStyleSpec","_getNativeFilter","_jsxRuntime","e","__esModule","default","Layer","id","props","frozenId","useFrozenId","nativeProps","useMemo","type","layerType","sourceLayer","filter","style","paint","layout","beforeId","afterId","layerIndex","rest","undefined","__DEV__","console","warn","mergedStyle","mergeStyleProps","getNativeFilter","reactStyle","transformStyle","jsx","testID","exports"],"sourceRoot":"../../../../src","sources":["components/layer/Layer.tsx"],"mappings":";;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAYA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AAA8D,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAE,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9D;AACA;AACA;;AAkBA;AACA;;AAQA;AACA;AACA
|
|
1
|
+
{"version":3,"names":["_react","require","_LayerNativeComponent","_interopRequireDefault","_useFrozenId","_StyleValue","_convertStyleSpec","_getNativeFilter","_jsxRuntime","e","__esModule","default","deprecationWarned","Layer","id","props","frozenId","useFrozenId","nativeProps","useMemo","type","layerType","sourceLayer","filter","style","paint","layout","beforeId","afterId","layerIndex","rest","undefined","__DEV__","console","warn","mergedStyle","mergeStyleProps","getNativeFilter","reactStyle","transformStyle","jsx","testID","exports"],"sourceRoot":"../../../../src","sources":["components/layer/Layer.tsx"],"mappings":";;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAYA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AAA8D,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAE,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9D,IAAIG,iBAAiB,GAAG,KAAK;;AAE7B;AACA;AACA;;AAkBA;AACA;;AAQA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;;AAsBA;AACA;AACA;;AAOA;AACA;AACA;;AAOA;AACA;AACA;;AAOA;AACA;AACA;;AAOA;AACA;AACA;;AAOA;AACA;AACA;;AAOA;AACA;AACA;;AAOA;AACA;AACA;;AAOA;AACA;AACA;;AAkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,KAAK,GAAGA,CAAC;E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__esModule", {
|
|
|
6
6
|
exports.UserLocation = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _UserLocationPuck = require("./UserLocationPuck.js");
|
|
9
|
+
var _heading = _interopRequireDefault(require("../../assets/heading.png"));
|
|
9
10
|
var _useCurrentPosition = require("../../hooks/useCurrentPosition.js");
|
|
10
11
|
var _LayerAnnotation = require("../annotations/LayerAnnotation.js");
|
|
12
|
+
var _Images = require("../images/Images.js");
|
|
11
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
15
|
const UserLocation = exports.UserLocation = /*#__PURE__*/(0, _react.memo)(({
|
|
13
16
|
animated = true,
|
|
14
17
|
accuracy = false,
|
|
@@ -26,18 +29,24 @@ const UserLocation = exports.UserLocation = /*#__PURE__*/(0, _react.memo)(({
|
|
|
26
29
|
if (!lngLat || !currentPosition) {
|
|
27
30
|
return null;
|
|
28
31
|
}
|
|
29
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
33
|
+
children: [heading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Images.Images, {
|
|
34
|
+
images: {
|
|
35
|
+
"mlrn-user-location-puck-heading": _heading.default
|
|
36
|
+
}
|
|
37
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LayerAnnotation.LayerAnnotation, {
|
|
38
|
+
animated: animated,
|
|
39
|
+
id: "mlrn-user-location",
|
|
40
|
+
testID: "mlrn-user-location",
|
|
41
|
+
onPress: onPress,
|
|
42
|
+
lngLat: lngLat,
|
|
43
|
+
children: children || /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserLocationPuck.UserLocationPuck, {
|
|
44
|
+
testID: "mlrn-user-location-puck",
|
|
45
|
+
source: "mlrn-user-location",
|
|
46
|
+
accuracy: accuracy ? currentPosition.coords.accuracy : undefined,
|
|
47
|
+
heading: heading ? currentPosition.coords.heading ?? undefined : undefined
|
|
48
|
+
})
|
|
49
|
+
})]
|
|
41
50
|
});
|
|
42
51
|
});
|
|
43
52
|
//# sourceMappingURL=UserLocation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_UserLocationPuck","_useCurrentPosition","_LayerAnnotation","_jsxRuntime","UserLocation","exports","memo","animated","accuracy","heading","minDisplacement","children","onPress","currentPosition","useCurrentPosition","lngLat","useMemo","coords","longitude","latitude","undefined","jsx","LayerAnnotation","id","testID","UserLocationPuck","source"],"sourceRoot":"../../../../src","sources":["components/user-location/UserLocation.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,
|
|
1
|
+
{"version":3,"names":["_react","require","_UserLocationPuck","_heading","_interopRequireDefault","_useCurrentPosition","_LayerAnnotation","_Images","_jsxRuntime","e","__esModule","default","UserLocation","exports","memo","animated","accuracy","heading","minDisplacement","children","onPress","currentPosition","useCurrentPosition","lngLat","useMemo","coords","longitude","latitude","undefined","jsxs","Fragment","jsx","Images","images","headingIcon","LayerAnnotation","id","testID","UserLocationPuck","source"],"sourceRoot":"../../../../src","sources":["components/user-location/UserLocation.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AAEA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAA0C,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAG,uBAAAK,CAAA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AAC,oBAAoB;QAC3BvB,QAAQ,EAAEA,QAAQ,GAAGK,eAAe,CAACI,MAAM,CAACT,QAAQ,GAAGY,SAAU;QACjEX,OAAO,EACLA,OAAO,GACFI,eAAe,CAACI,MAAM,CAACR,OAAO,IAAIW,SAAS,GAC5CA;MACL,CACF;IACF,CACc,CAAC;EAAA,CAClB,CAAC;AAEP,CACF,CAAC","ignoreList":[]}
|
|
@@ -9,25 +9,25 @@ var _UserLocationPuckHeading = require("./UserLocationPuckHeading.js");
|
|
|
9
9
|
var _Layer = require("../layer/Layer.js");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
const blue = "#33B5E5";
|
|
12
|
-
const
|
|
12
|
+
const CIRCLE_LAYERS_PAINT = {
|
|
13
13
|
accuracy: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
"circle-color": blue,
|
|
15
|
+
"circle-opacity": 0.2,
|
|
16
|
+
"circle-pitch-alignment": "map",
|
|
17
|
+
"circle-radius-transition": {
|
|
18
18
|
duration: 300,
|
|
19
19
|
delay: 0
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
white: {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
"circle-radius": 9,
|
|
24
|
+
"circle-color": "#fff",
|
|
25
|
+
"circle-pitch-alignment": "map"
|
|
26
26
|
},
|
|
27
27
|
blue: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
"circle-radius": 6,
|
|
29
|
+
"circle-color": blue,
|
|
30
|
+
"circle-pitch-alignment": "map"
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
const UserLocationPuck = exports.UserLocationPuck = /*#__PURE__*/(0, _react.memo)(({
|
|
@@ -41,22 +41,22 @@ const UserLocationPuck = exports.UserLocationPuck = /*#__PURE__*/(0, _react.memo
|
|
|
41
41
|
id: "mlrn-user-location-puck-accuracy",
|
|
42
42
|
testID: "mlrn-user-location-puck-accuracy",
|
|
43
43
|
source: source,
|
|
44
|
-
|
|
45
|
-
...
|
|
46
|
-
|
|
44
|
+
paint: {
|
|
45
|
+
...CIRCLE_LAYERS_PAINT.accuracy,
|
|
46
|
+
"circle-radius": ["interpolate", ["exponential", 2], ["zoom"], 0, CIRCLE_LAYERS_PAINT.white["circle-radius"], 22, CIRCLE_LAYERS_PAINT.white["circle-radius"] + accuracy * 100]
|
|
47
47
|
}
|
|
48
48
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layer.Layer, {
|
|
49
49
|
type: "circle",
|
|
50
50
|
id: "mlrn-user-location-puck-white",
|
|
51
51
|
testID: "mlrn-user-location-puck-white",
|
|
52
52
|
source: source,
|
|
53
|
-
|
|
53
|
+
paint: CIRCLE_LAYERS_PAINT.white
|
|
54
54
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layer.Layer, {
|
|
55
55
|
type: "circle",
|
|
56
56
|
id: "mlrn-user-location-puck-blue",
|
|
57
57
|
testID: "mlrn-user-location-puck-blue",
|
|
58
58
|
source: source,
|
|
59
|
-
|
|
59
|
+
paint: CIRCLE_LAYERS_PAINT.blue
|
|
60
60
|
}), typeof heading === "number" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserLocationPuckHeading.UserLocationPuckHeading, {
|
|
61
61
|
source: source,
|
|
62
62
|
beforeId: "mlrn-user-location-puck-white",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_UserLocationPuckHeading","_Layer","_jsxRuntime","blue","
|
|
1
|
+
{"version":3,"names":["_react","require","_UserLocationPuckHeading","_Layer","_jsxRuntime","blue","CIRCLE_LAYERS_PAINT","accuracy","duration","delay","white","UserLocationPuck","exports","memo","source","heading","jsxs","Fragment","children","jsx","Layer","type","id","testID","paint","UserLocationPuckHeading","beforeId"],"sourceRoot":"../../../../src","sources":["components/user-location/UserLocationPuck.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAA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GH,QAAQ,GAAG,GAAG;MAE/D;IAAE,CACH,CACF,eACD,IAAAH,WAAA,CAAAe,GAAA,EAAChB,MAAA,CAAAiB,KAAK;MACJC,IAAI,EAAC,QAAQ;MACbC,EAAE,EAAC,+BAA+B;MAClCC,MAAM,EAAC,+BAA+B;MACtCT,MAAM,EAAEA,MAAO;MACfU,KAAK,EAAElB,mBAAmB,CAACI;IAAM,CAClC,CAAC,eACF,IAAAN,WAAA,CAAAe,GAAA,EAAChB,MAAA,CAAAiB,KAAK;MACJC,IAAI,EAAC,QAAQ;MACbC,EAAE,EAAC,8BAA8B;MACjCC,MAAM,EAAC,8BAA8B;MACrCT,MAAM,EAAEA,MAAO;MACfU,KAAK,EAAElB,mBAAmB,CAACD;IAAK,CACjC,CAAC,EACD,OAAOU,OAAO,KAAK,QAAQ,iBAC1B,IAAAX,WAAA,CAAAe,GAAA,EAACjB,wBAAA,CAAAuB,uBAAuB;MACtBX,MAAM,EAAEA,MAAO;MACfY,QAAQ,EAAC,+BAA+B;MACxCX,OAAO,EAAEA;IAAQ,CAClB,CACF;EAAA,CACD,CAAC;AAEP,CACF,CAAC","ignoreList":[]}
|
|
@@ -5,15 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.UserLocationPuckHeading = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var _heading = _interopRequireDefault(require("../../assets/heading.png"));
|
|
9
8
|
var _Layer = require("../layer/Layer.js");
|
|
10
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
iconRotationAlignment: "map"
|
|
10
|
+
const SYMBOL_LAYER_LAYOUT = {
|
|
11
|
+
"icon-image": "mlrn-user-location-puck-heading",
|
|
12
|
+
"icon-allow-overlap": true,
|
|
13
|
+
"icon-pitch-alignment": "map",
|
|
14
|
+
"icon-rotation-alignment": "map"
|
|
17
15
|
};
|
|
18
16
|
const UserLocationPuckHeading = exports.UserLocationPuckHeading = /*#__PURE__*/(0, _react.memo)(({
|
|
19
17
|
source,
|
|
@@ -25,9 +23,9 @@ const UserLocationPuckHeading = exports.UserLocationPuckHeading = /*#__PURE__*/(
|
|
|
25
23
|
testID: "mlrn-user-location-puck-heading",
|
|
26
24
|
source: source,
|
|
27
25
|
beforeId: beforeId,
|
|
28
|
-
|
|
29
|
-
...
|
|
30
|
-
|
|
26
|
+
layout: {
|
|
27
|
+
...SYMBOL_LAYER_LAYOUT,
|
|
28
|
+
"icon-rotate": heading
|
|
31
29
|
}
|
|
32
30
|
}));
|
|
33
31
|
//# sourceMappingURL=UserLocationPuckHeading.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","
|
|
1
|
+
{"version":3,"names":["_react","require","_Layer","_jsxRuntime","SYMBOL_LAYER_LAYOUT","UserLocationPuckHeading","exports","memo","source","beforeId","heading","jsx","Layer","type","id","testID","layout"],"sourceRoot":"../../../../src","sources":["components/user-location/UserLocationPuckHeading.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,MAAA,GAAAD,OAAA;AAAuC,IAAAE,WAAA,GAAAF,OAAA;AAEvC,MAAMG,mBAAuD,GAAG;EAC9D,YAAY,EAAE,iCAAiC;EAC/C,oBAAoB,EAAE,IAAI;EAC1B,sBAAsB,EAAE,KAAK;EAC7B,yBAAyB,EAAE;AAC7B,CAAC;AAQM,MAAMC,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,gBAAG,IAAAE,WAAI,EACzC,CAAC;EAAEC,MAAM;EAAEC,QAAQ;EAAEC;AAAsC,CAAC,kBAC1D,IAAAP,WAAA,CAAAQ,GAAA,EAACT,MAAA,CAAAU,KAAK;EACJC,IAAI,EAAC,QAAQ;EACbC,EAAE,EAAC,iCAAiC;EACpCC,MAAM,EAAC,iCAAiC;EACxCP,MAAM,EAAEA,MAAO;EACfC,QAAQ,EAAEA,QAAS;EACnBO,MAAM,EAAE;IACN,GAAGZ,mBAAmB;IACtB,aAAa,EAAEM;EACjB;AAAE,CACH,CAEL,CAAC","ignoreList":[]}
|
|
@@ -6,94 +6,62 @@ import { useFrozenId } from "../../hooks/useFrozenId.js";
|
|
|
6
6
|
import { transformStyle } from "../../utils/StyleValue.js";
|
|
7
7
|
import { mergeStyleProps } from "../../utils/convertStyleSpec.js";
|
|
8
8
|
import { getNativeFilter } from "../../utils/getNativeFilter.js";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
let deprecationWarned = false;
|
|
9
11
|
|
|
10
12
|
/**
|
|
11
|
-
* Additional props specific to maplibre-react-native.
|
|
13
|
+
* Additional props specific to @maplibre/maplibre-react-native.
|
|
12
14
|
*/
|
|
13
15
|
|
|
14
16
|
// Utility types following react-map-gl pattern
|
|
15
17
|
// See: https://github.com/microsoft/TypeScript/issues/39556#issuecomment-656925230
|
|
16
18
|
|
|
17
19
|
/**
|
|
18
|
-
* Base layer props from style spec with optional id
|
|
19
|
-
* Matches react-map-gl's LayerProps pattern.
|
|
20
|
+
* Base layer props from style spec with optional `id`/`source`.
|
|
20
21
|
*/
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* Common props shared by all layer types.
|
|
24
25
|
*
|
|
25
|
-
* @deprecated Use `paint` and `layout` props instead of `style`.
|
|
26
|
+
* @deprecated Use `paint` and `layout` props instead of `style`. The `style` prop be removed in v12.
|
|
26
27
|
*/
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
|
-
* @deprecated Use LayerProps instead.
|
|
30
|
+
* @deprecated Use `LayerProps` instead.
|
|
30
31
|
*/
|
|
31
32
|
|
|
32
|
-
// ============================================================================
|
|
33
|
-
// DEPRECATED: Legacy type exports for backwards compatibility
|
|
34
|
-
// These will be removed in v12. Use LayerProps with paint/layout instead.
|
|
35
|
-
// ============================================================================
|
|
36
|
-
|
|
37
33
|
/**
|
|
38
|
-
* @deprecated Use
|
|
34
|
+
* @deprecated Use `layout`/`paint` instead of `style` prop.
|
|
39
35
|
*/
|
|
40
36
|
|
|
41
37
|
/**
|
|
42
|
-
* @deprecated Use
|
|
38
|
+
* @deprecated Use `layout`/`paint` instead of `style` prop.
|
|
43
39
|
*/
|
|
44
40
|
|
|
45
41
|
/**
|
|
46
|
-
* @deprecated Use
|
|
42
|
+
* @deprecated Use `layout`/`paint` instead of `style` prop.
|
|
47
43
|
*/
|
|
48
44
|
|
|
49
45
|
/**
|
|
50
|
-
* @deprecated Use
|
|
46
|
+
* @deprecated Use `layout`/`paint` instead of `style` prop.
|
|
51
47
|
*/
|
|
52
48
|
|
|
53
49
|
/**
|
|
54
|
-
* @deprecated Use
|
|
50
|
+
* @deprecated Use `layout`/`paint` instead of `style` prop.
|
|
55
51
|
*/
|
|
56
52
|
|
|
57
53
|
/**
|
|
58
|
-
* @deprecated Use
|
|
54
|
+
* @deprecated Use `layout`/`paint` instead of `style` prop.
|
|
59
55
|
*/
|
|
60
56
|
|
|
61
57
|
/**
|
|
62
|
-
* @deprecated Use
|
|
58
|
+
* @deprecated Use `layout`/`paint` instead of `style` prop.
|
|
63
59
|
*/
|
|
64
60
|
|
|
65
61
|
/**
|
|
66
|
-
* @deprecated Use
|
|
62
|
+
* @deprecated Use `layout`/`paint` instead of `style` prop.
|
|
67
63
|
*/
|
|
68
64
|
|
|
69
|
-
/**
|
|
70
|
-
* Layer component props.
|
|
71
|
-
* Combines style spec LayerSpecification with MLRN-specific props.
|
|
72
|
-
*
|
|
73
|
-
* The `paint` and `layout` props come directly from LayerSpecification
|
|
74
|
-
* and use kebab-case property names per the MapLibre Style Spec.
|
|
75
|
-
*
|
|
76
|
-
* @example
|
|
77
|
-
* ```tsx
|
|
78
|
-
* // Style spec compliant (recommended)
|
|
79
|
-
* <Layer
|
|
80
|
-
* type="fill"
|
|
81
|
-
* id="parks"
|
|
82
|
-
* source="parks-source"
|
|
83
|
-
* paint={{ "fill-color": "green", "fill-opacity": 0.5 }}
|
|
84
|
-
* layout={{ "visibility": "visible" }}
|
|
85
|
-
* />
|
|
86
|
-
*
|
|
87
|
-
* // Deprecated (still works)
|
|
88
|
-
* <Layer
|
|
89
|
-
* type="fill"
|
|
90
|
-
* id="parks"
|
|
91
|
-
* source="parks-source"
|
|
92
|
-
* style={{ fillColor: "green", fillOpacity: 0.5 }}
|
|
93
|
-
* />
|
|
94
|
-
* ```
|
|
95
|
-
*/
|
|
96
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
97
65
|
/**
|
|
98
66
|
* Layer is a style layer that renders geospatial data on the map.
|
|
99
67
|
*
|
|
@@ -120,14 +88,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
120
88
|
* "fill-color": ["interpolate", ["linear"], ["get", "elevation"], 0, "blue", 100, "red"],
|
|
121
89
|
* }}
|
|
122
90
|
* />
|
|
123
|
-
*
|
|
124
|
-
* // Deprecated style prop (still works but will be removed in v12)
|
|
125
|
-
* <Layer
|
|
126
|
-
* type="fill"
|
|
127
|
-
* id="parks"
|
|
128
|
-
* source="parks-source"
|
|
129
|
-
* style={{ fillColor: "green", fillOpacity: 0.5 }}
|
|
130
|
-
* />
|
|
131
91
|
* ```
|
|
132
92
|
*/
|
|
133
93
|
export const Layer = ({
|
|
@@ -154,14 +114,9 @@ export const Layer = ({
|
|
|
154
114
|
layout: undefined,
|
|
155
115
|
...props
|
|
156
116
|
};
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
if (paint || layout) {
|
|
161
|
-
console.warn("@maplibre/maplibre-react-native: Using both `style` and `paint`/`layout` props. " + "The `style` prop is deprecated and will be removed in v12. " + "Properties from `paint`/`layout` take precedence.");
|
|
162
|
-
} else {
|
|
163
|
-
console.warn("@maplibre/maplibre-react-native: The `style` prop is deprecated. " + "Use `paint` and `layout` props instead. Will be removed in v12.");
|
|
164
|
-
}
|
|
117
|
+
if (__DEV__ && style && !deprecationWarned) {
|
|
118
|
+
deprecationWarned = true;
|
|
119
|
+
console.warn("[@maplibre/maplibre-react-native] The `style` prop is deprecated. " + "Use `paint` and `layout` props instead. `style` will be removed in v12.");
|
|
165
120
|
}
|
|
166
121
|
|
|
167
122
|
// Merge paint/layout (new API) with style (deprecated API)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","LayerNativeComponent","useFrozenId","transformStyle","mergeStyleProps","getNativeFilter","jsx","_jsx","Layer","id","props","frozenId","nativeProps","type","layerType","sourceLayer","filter","style","paint","layout","beforeId","afterId","layerIndex","rest","undefined","__DEV__","console","warn","mergedStyle","reactStyle","testID"],"sourceRoot":"../../../../src","sources":["components/layer/Layer.tsx"],"mappings":";;AAIA,SAASA,OAAO,QAAQ,OAAO;AAE/B,OAAOC,oBAAoB,MAAM,wBAAwB;AACzD,SAASC,WAAW,QAAQ,4BAAyB;AAYrD,SAASC,cAAc,QAAQ,2BAAwB;AACvD,SAASC,eAAe,QAAQ,iCAA8B;AAC9D,SAASC,eAAe,QAAQ,gCAA6B;;
|
|
1
|
+
{"version":3,"names":["useMemo","LayerNativeComponent","useFrozenId","transformStyle","mergeStyleProps","getNativeFilter","jsx","_jsx","deprecationWarned","Layer","id","props","frozenId","nativeProps","type","layerType","sourceLayer","filter","style","paint","layout","beforeId","afterId","layerIndex","rest","undefined","__DEV__","console","warn","mergedStyle","reactStyle","testID"],"sourceRoot":"../../../../src","sources":["components/layer/Layer.tsx"],"mappings":";;AAIA,SAASA,OAAO,QAAQ,OAAO;AAE/B,OAAOC,oBAAoB,MAAM,wBAAwB;AACzD,SAASC,WAAW,QAAQ,4BAAyB;AAYrD,SAASC,cAAc,QAAQ,2BAAwB;AACvD,SAASC,eAAe,QAAQ,iCAA8B;AAC9D,SAASC,eAAe,QAAQ,gCAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE9D,IAAIC,iBAAiB,GAAG,KAAK;;AAE7B;AACA;AACA;;AAkBA;AACA;;AAQA;AACA;AACA;;AAOA;AACA;AACA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AClB,KAAK,CAAC,CAAC;EAEX,oBACEJ,IAAA,CAACN,oBAAoB;IACnBS,EAAE,EAAEE,QAAS;IACbmB,MAAM,EAAE,QAAQpB,KAAK,CAACG,IAAI,QAAS;IAAA,GAC/BD;EAAW,CAChB,CAAC;AAEN,CAAC","ignoreList":[]}
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import { memo, useMemo } from "react";
|
|
4
4
|
import { UserLocationPuck } from "./UserLocationPuck.js";
|
|
5
|
+
import headingIcon from "../../assets/heading.png";
|
|
5
6
|
import { useCurrentPosition } from "../../hooks/useCurrentPosition.js";
|
|
6
7
|
import { LayerAnnotation } from "../annotations/LayerAnnotation.js";
|
|
7
|
-
import {
|
|
8
|
+
import { Images } from "../images/Images.js";
|
|
9
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
10
|
export const UserLocation = /*#__PURE__*/memo(({
|
|
9
11
|
animated = true,
|
|
10
12
|
accuracy = false,
|
|
@@ -22,18 +24,24 @@ export const UserLocation = /*#__PURE__*/memo(({
|
|
|
22
24
|
if (!lngLat || !currentPosition) {
|
|
23
25
|
return null;
|
|
24
26
|
}
|
|
25
|
-
return /*#__PURE__*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
28
|
+
children: [heading && /*#__PURE__*/_jsx(Images, {
|
|
29
|
+
images: {
|
|
30
|
+
"mlrn-user-location-puck-heading": headingIcon
|
|
31
|
+
}
|
|
32
|
+
}), /*#__PURE__*/_jsx(LayerAnnotation, {
|
|
33
|
+
animated: animated,
|
|
34
|
+
id: "mlrn-user-location",
|
|
35
|
+
testID: "mlrn-user-location",
|
|
36
|
+
onPress: onPress,
|
|
37
|
+
lngLat: lngLat,
|
|
38
|
+
children: children || /*#__PURE__*/_jsx(UserLocationPuck, {
|
|
39
|
+
testID: "mlrn-user-location-puck",
|
|
40
|
+
source: "mlrn-user-location",
|
|
41
|
+
accuracy: accuracy ? currentPosition.coords.accuracy : undefined,
|
|
42
|
+
heading: heading ? currentPosition.coords.heading ?? undefined : undefined
|
|
43
|
+
})
|
|
44
|
+
})]
|
|
37
45
|
});
|
|
38
46
|
});
|
|
39
47
|
//# sourceMappingURL=UserLocation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","useMemo","UserLocationPuck","useCurrentPosition","LayerAnnotation","jsx","_jsx","UserLocation","animated","accuracy","heading","minDisplacement","children","onPress","currentPosition","lngLat","coords","longitude","latitude","undefined","id","testID","source"],"sourceRoot":"../../../../src","sources":["components/user-location/UserLocation.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAkBC,OAAO,QAAQ,OAAO;AAErD,SAASC,gBAAgB,QAAQ,uBAAoB;AACrD,SAASC,kBAAkB,QAAQ,mCAAgC;AAEnE,SAASC,eAAe,QAAQ,mCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"names":["memo","useMemo","UserLocationPuck","headingIcon","useCurrentPosition","LayerAnnotation","Images","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","UserLocation","animated","accuracy","heading","minDisplacement","children","onPress","currentPosition","lngLat","coords","longitude","latitude","undefined","images","id","testID","source"],"sourceRoot":"../../../../src","sources":["components/user-location/UserLocation.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAkBC,OAAO,QAAQ,OAAO;AAErD,SAASC,gBAAgB,QAAQ,uBAAoB;AACrD,OAAOC,WAAW,MAAM,0BAA0B;AAClD,SAASC,kBAAkB,QAAQ,mCAAgC;AAEnE,SAASC,eAAe,QAAQ,mCAAgC;AAChE,SAASC,MAAM,QAAQ,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAA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