@maplibre/maplibre-react-native 10.1.0-beta.1 → 10.1.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.
- package/android/gradle.properties +1 -1
- package/ios/MLRN/CameraStop.h +1 -1
- package/ios/MLRN/CameraStop.m +58 -60
- package/ios/MLRN/CameraUpdateItem.h +2 -1
- package/ios/MLRN/CameraUpdateItem.m +132 -132
- package/ios/MLRN/CameraUpdateQueue.m +43 -47
- package/ios/MLRN/FilterParser.h +1 -1
- package/ios/MLRN/FilterParser.m +5 -6
- package/ios/MLRN/MLRNBackgroundLayer.m +10 -9
- package/ios/MLRN/MLRNBackgroundLayerManager.m +4 -5
- package/ios/MLRN/MLRNCallout.h +1 -1
- package/ios/MLRN/MLRNCallout.m +37 -36
- package/ios/MLRN/MLRNCalloutManager.m +2 -3
- package/ios/MLRN/MLRNCamera.h +1 -1
- package/ios/MLRN/MLRNCamera.m +169 -182
- package/ios/MLRN/MLRNCameraManager.m +4 -6
- package/ios/MLRN/MLRNCircleLayer.m +17 -14
- package/ios/MLRN/MLRNCircleLayerManager.m +4 -5
- package/ios/MLRN/MLRNCustomHeaders.h +2 -2
- package/ios/MLRN/MLRNCustomHeaders.m +63 -63
- package/ios/MLRN/MLRNEvent.h +3 -3
- package/ios/MLRN/MLRNEvent.m +19 -24
- package/ios/MLRN/MLRNEventProtocol.h +1 -1
- package/ios/MLRN/MLRNFillExtrusionLayer.m +18 -14
- package/ios/MLRN/MLRNFillExtrusionLayerManager.m +4 -5
- package/ios/MLRN/MLRNFillLayer.m +16 -14
- package/ios/MLRN/MLRNFillLayerManager.m +4 -5
- package/ios/MLRN/MLRNHeatmapLayer.m +17 -14
- package/ios/MLRN/MLRNHeatmapLayerManager.m +4 -5
- package/ios/MLRN/MLRNImageQueue.h +4 -1
- package/ios/MLRN/MLRNImageQueue.m +29 -32
- package/ios/MLRN/MLRNImageQueueOperation.h +1 -1
- package/ios/MLRN/MLRNImageQueueOperation.m +92 -91
- package/ios/MLRN/MLRNImageSource.m +36 -38
- package/ios/MLRN/MLRNImageSourceManager.m +2 -3
- package/ios/MLRN/MLRNImageUtils.h +3 -3
- package/ios/MLRN/MLRNImageUtils.m +15 -14
- package/ios/MLRN/MLRNImages.h +0 -1
- package/ios/MLRN/MLRNImages.m +89 -91
- package/ios/MLRN/MLRNImagesManager.m +4 -5
- package/ios/MLRN/MLRNLayer.h +9 -11
- package/ios/MLRN/MLRNLayer.m +170 -182
- package/ios/MLRN/MLRNLight.m +21 -23
- package/ios/MLRN/MLRNLightManager.m +2 -3
- package/ios/MLRN/MLRNLineLayer.m +17 -15
- package/ios/MLRN/MLRNLineLayerManager.m +4 -6
- package/ios/MLRN/MLRNLocation.h +1 -1
- package/ios/MLRN/MLRNLocation.m +16 -17
- package/ios/MLRN/MLRNLocationManager.m +109 -124
- package/ios/MLRN/MLRNLocationManagerDelegate.h +3 -3
- package/ios/MLRN/MLRNLocationModule.h +1 -1
- package/ios/MLRN/MLRNLocationModule.m +40 -55
- package/ios/MLRN/MLRNLogging.h +1 -4
- package/ios/MLRN/MLRNLogging.m +84 -89
- package/ios/MLRN/MLRNMapTouchEvent.h +2 -2
- package/ios/MLRN/MLRNMapTouchEvent.m +50 -49
- package/ios/MLRN/MLRNMapView.h +43 -36
- package/ios/MLRN/MLRNMapView.m +409 -440
- package/ios/MLRN/MLRNMapViewManager.m +489 -502
- package/ios/MLRN/MLRNModule.h +1 -1
- package/ios/MLRN/MLRNModule.m +111 -105
- package/ios/MLRN/MLRNNativeUserLocation.m +24 -27
- package/ios/MLRN/MLRNNativeUserLocationManager.m +4 -8
- package/ios/MLRN/MLRNOfflineModule.h +1 -1
- package/ios/MLRN/MLRNOfflineModule.m +416 -421
- package/ios/MLRN/MLRNPointAnnotation.h +2 -2
- package/ios/MLRN/MLRNPointAnnotation.m +154 -175
- package/ios/MLRN/MLRNPointAnnotationManager.m +2 -3
- package/ios/MLRN/MLRNRasterLayer.m +16 -12
- package/ios/MLRN/MLRNRasterLayerManager.m +4 -5
- package/ios/MLRN/MLRNRasterSource.m +21 -17
- package/ios/MLRN/MLRNRasterSourceManager.m +2 -3
- package/ios/MLRN/MLRNShapeSource.h +17 -16
- package/ios/MLRN/MLRNShapeSource.m +94 -102
- package/ios/MLRN/MLRNShapeSourceManager.h +2 -2
- package/ios/MLRN/MLRNShapeSourceManager.m +86 -90
- package/ios/MLRN/MLRNSnapshotModule.h +1 -1
- package/ios/MLRN/MLRNSnapshotModule.m +51 -53
- package/ios/MLRN/MLRNSource.h +12 -12
- package/ios/MLRN/MLRNSource.m +82 -88
- package/ios/MLRN/MLRNStyleValue.h +1 -1
- package/ios/MLRN/MLRNStyleValue.m +128 -128
- package/ios/MLRN/MLRNSymbolLayer.m +17 -13
- package/ios/MLRN/MLRNSymbolLayerManager.m +4 -5
- package/ios/MLRN/MLRNTileSource.h +1 -1
- package/ios/MLRN/MLRNTileSource.m +21 -20
- package/ios/MLRN/MLRNUserLocation.h +1 -1
- package/ios/MLRN/MLRNUserLocation.m +10 -12
- package/ios/MLRN/MLRNUtils.h +18 -11
- package/ios/MLRN/MLRNUtils.m +168 -160
- package/ios/MLRN/MLRNVectorLayer.m +28 -34
- package/ios/MLRN/MLRNVectorSource.h +3 -1
- package/ios/MLRN/MLRNVectorSource.m +14 -11
- package/ios/MLRN/MLRNVectorSourceManager.h +2 -2
- package/ios/MLRN/MLRNVectorSourceManager.m +36 -39
- package/ios/MLRN/ViewManager.h +1 -1
- package/ios/MLRN/ViewManager.m +29 -35
- package/lib/commonjs/components/MarkerView.js +1 -1
- package/lib/commonjs/components/UserLocation.js +8 -38
- package/lib/commonjs/components/UserLocation.js.map +1 -1
- package/lib/commonjs/components/UserLocationPuck.js +52 -0
- package/lib/commonjs/components/UserLocationPuck.js.map +1 -0
- package/lib/commonjs/components/{HeadingIndicator.js → UserLocationPuckHeading.js} +12 -9
- package/lib/commonjs/components/UserLocationPuckHeading.js.map +1 -0
- package/lib/commonjs/plugin/android.js +4 -6
- package/lib/commonjs/plugin/android.js.map +1 -1
- package/lib/module/components/MarkerView.js +1 -1
- package/lib/module/components/UserLocation.js +7 -36
- package/lib/module/components/UserLocation.js.map +1 -1
- package/lib/module/components/UserLocationPuck.js +48 -0
- package/lib/module/components/UserLocationPuck.js.map +1 -0
- package/lib/module/components/{HeadingIndicator.js → UserLocationPuckHeading.js} +11 -7
- package/lib/module/components/UserLocationPuckHeading.js.map +1 -0
- package/lib/module/plugin/android.js +3 -5
- package/lib/module/plugin/android.js.map +1 -1
- package/lib/typescript/commonjs/src/components/MarkerView.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/UserLocation.d.ts +0 -1
- package/lib/typescript/commonjs/src/components/UserLocation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/UserLocationPuck.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/UserLocationPuck.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/UserLocationPuckHeading.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/UserLocationPuckHeading.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/plugin/MapLibrePluginProps.d.ts +1 -1
- package/lib/typescript/commonjs/src/plugin/android.d.ts +1 -0
- package/lib/typescript/commonjs/src/plugin/android.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts +0 -1
- package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +0 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts +0 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts +0 -1
- package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts.map +1 -1
- package/lib/typescript/module/src/components/MarkerView.d.ts +1 -1
- package/lib/typescript/module/src/components/UserLocation.d.ts +0 -1
- package/lib/typescript/module/src/components/UserLocation.d.ts.map +1 -1
- package/lib/typescript/module/src/components/UserLocationPuck.d.ts +9 -0
- package/lib/typescript/module/src/components/UserLocationPuck.d.ts.map +1 -0
- package/lib/typescript/module/src/components/UserLocationPuckHeading.d.ts +9 -0
- package/lib/typescript/module/src/components/UserLocationPuckHeading.d.ts.map +1 -0
- package/lib/typescript/module/src/plugin/MapLibrePluginProps.d.ts +1 -1
- package/lib/typescript/module/src/plugin/android.d.ts +1 -0
- package/lib/typescript/module/src/plugin/android.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts +0 -1
- package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +0 -1
- package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts +0 -1
- package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts +0 -1
- package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts.map +1 -1
- package/maplibre-react-native.podspec +1 -1
- package/package.json +8 -8
- package/src/components/MarkerView.tsx +1 -1
- package/src/components/UserLocation.tsx +13 -51
- package/src/components/UserLocationPuck.tsx +62 -0
- package/src/components/UserLocationPuckHeading.tsx +33 -0
- package/src/plugin/MapLibrePluginProps.ts +1 -1
- package/src/plugin/android.ts +7 -3
- package/lib/commonjs/components/HeadingIndicator.js.map +0 -1
- package/lib/module/components/HeadingIndicator.js.map +0 -1
- package/lib/typescript/commonjs/src/components/HeadingIndicator.d.ts +0 -7
- package/lib/typescript/commonjs/src/components/HeadingIndicator.d.ts.map +0 -1
- package/lib/typescript/module/src/components/HeadingIndicator.d.ts +0 -7
- package/lib/typescript/module/src/components/HeadingIndicator.d.ts.map +0 -1
- package/src/components/HeadingIndicator.tsx +0 -26
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { memo } from "react";
|
|
2
|
+
|
|
3
|
+
import { SymbolLayer } from "./SymbolLayer";
|
|
4
|
+
import headingIcon from "../assets/heading.png";
|
|
5
|
+
import { type BaseProps } from "../types/BaseProps";
|
|
6
|
+
import type { SymbolLayerStyle } from "../types/MapLibreRNStyles";
|
|
7
|
+
|
|
8
|
+
const layerStyle: SymbolLayerStyle = {
|
|
9
|
+
iconImage: headingIcon,
|
|
10
|
+
iconAllowOverlap: true,
|
|
11
|
+
iconPitchAlignment: "map",
|
|
12
|
+
iconRotationAlignment: "map",
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
interface UserLocationPuckHeadingProps extends BaseProps {
|
|
16
|
+
sourceID: string;
|
|
17
|
+
belowLayerID?: string;
|
|
18
|
+
heading: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const UserLocationPuckHeading = memo(
|
|
22
|
+
({ sourceID, belowLayerID, heading }: UserLocationPuckHeadingProps) => (
|
|
23
|
+
<SymbolLayer
|
|
24
|
+
id="mlrn-user-location-puck-heading"
|
|
25
|
+
sourceID={sourceID}
|
|
26
|
+
belowLayerID={belowLayerID}
|
|
27
|
+
style={{
|
|
28
|
+
iconRotate: heading,
|
|
29
|
+
...layerStyle,
|
|
30
|
+
}}
|
|
31
|
+
/>
|
|
32
|
+
),
|
|
33
|
+
);
|
package/src/plugin/android.ts
CHANGED
|
@@ -12,6 +12,8 @@ type PropertyItem = {
|
|
|
12
12
|
value: string;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
+
export const GRADLE_PROPERTIES_PREFIX = "org.maplibre.reactnative.";
|
|
16
|
+
|
|
15
17
|
export const getGradleProperties = (
|
|
16
18
|
props: MapLibrePluginProps,
|
|
17
19
|
): PropertyItem[] => {
|
|
@@ -20,7 +22,7 @@ export const getGradleProperties = (
|
|
|
20
22
|
if (key && value) {
|
|
21
23
|
properties.push({
|
|
22
24
|
type: "property",
|
|
23
|
-
key:
|
|
25
|
+
key: `${GRADLE_PROPERTIES_PREFIX}${key}`,
|
|
24
26
|
value: value.toString(),
|
|
25
27
|
});
|
|
26
28
|
}
|
|
@@ -35,10 +37,12 @@ export const mergeGradleProperties = (
|
|
|
35
37
|
oldProperties: PropertiesItem[],
|
|
36
38
|
newProperties: PropertyItem[],
|
|
37
39
|
): PropertiesItem[] => {
|
|
38
|
-
const newPropertiesKeys = newProperties.map(({ key }) => key);
|
|
39
40
|
const merged = oldProperties.filter(
|
|
40
41
|
(item) =>
|
|
41
|
-
!(
|
|
42
|
+
!(
|
|
43
|
+
item.type === "property" &&
|
|
44
|
+
item.key.startsWith(GRADLE_PROPERTIES_PREFIX)
|
|
45
|
+
),
|
|
42
46
|
);
|
|
43
47
|
|
|
44
48
|
merged.push(...newProperties);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_SymbolLayer","require","_heading","_interopRequireDefault","_jsxRuntime","e","__esModule","default","style","iconImage","headingIcon","iconAllowOverlap","iconPitchAlignment","iconRotationAlignment","HeadingIndicator","heading","jsx","SymbolLayer","id","belowLayerID","iconRotate","exports"],"sourceRoot":"../../../src","sources":["components/HeadingIndicator.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAgD,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGhD,MAAMG,KAAK,GAAG;EACZC,SAAS,EAAEC,gBAAW;EACtBC,gBAAgB,EAAE,IAAI;EACtBC,kBAAkB,EAAE,KAAK;EACzBC,qBAAqB,EAAE;AACzB,CAAU;AAMH,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC;AAA+B,CAAC,kBACjE,IAAAX,WAAA,CAAAY,GAAA,EAAChB,YAAA,CAAAiB,WAAW;EAEVC,EAAE,EAAC,oCAAoC;EACvCC,YAAY,EAAC,+BAA+B;EAC5CX,KAAK,EAAE;IACLY,UAAU,EAAEL,OAAO;IACnB,GAAGP;EACL;AAAE,GANE,oCAOL,CACF;AAACa,OAAA,CAAAP,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["SymbolLayer","headingIcon","jsx","_jsx","style","iconImage","iconAllowOverlap","iconPitchAlignment","iconRotationAlignment","HeadingIndicator","heading","id","belowLayerID","iconRotate"],"sourceRoot":"../../../src","sources":["components/HeadingIndicator.tsx"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,kBAAe;AAC3C,OAAOC,WAAW,MAAM,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGhD,MAAMC,KAAK,GAAG;EACZC,SAAS,EAAEJ,WAAW;EACtBK,gBAAgB,EAAE,IAAI;EACtBC,kBAAkB,EAAE,KAAK;EACzBC,qBAAqB,EAAE;AACzB,CAAU;AAMV,OAAO,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC;AAA+B,CAAC,kBACjEP,IAAA,CAACH,WAAW;EAEVW,EAAE,EAAC,oCAAoC;EACvCC,YAAY,EAAC,+BAA+B;EAC5CR,KAAK,EAAE;IACLS,UAAU,EAAEH,OAAO;IACnB,GAAGN;EACL;AAAE,GANE,oCAOL,CACF","ignoreList":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type BaseProps } from "../types/BaseProps";
|
|
2
|
-
interface HeadingIndicatorProps extends BaseProps {
|
|
3
|
-
heading?: number;
|
|
4
|
-
}
|
|
5
|
-
export declare const HeadingIndicator: ({ heading }: HeadingIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export {};
|
|
7
|
-
//# sourceMappingURL=HeadingIndicator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HeadingIndicator.d.ts","sourceRoot":"","sources":["../../../../../src/components/HeadingIndicator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AASpD,UAAU,qBAAsB,SAAQ,SAAS;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,gBAAgB,gBAAiB,qBAAqB,4CAUlE,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type BaseProps } from "../types/BaseProps";
|
|
2
|
-
interface HeadingIndicatorProps extends BaseProps {
|
|
3
|
-
heading?: number;
|
|
4
|
-
}
|
|
5
|
-
export declare const HeadingIndicator: ({ heading }: HeadingIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export {};
|
|
7
|
-
//# sourceMappingURL=HeadingIndicator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HeadingIndicator.d.ts","sourceRoot":"","sources":["../../../../../src/components/HeadingIndicator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AASpD,UAAU,qBAAsB,SAAQ,SAAS;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,gBAAgB,gBAAiB,qBAAqB,4CAUlE,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { SymbolLayer } from "./SymbolLayer";
|
|
2
|
-
import headingIcon from "../assets/heading.png";
|
|
3
|
-
import { type BaseProps } from "../types/BaseProps";
|
|
4
|
-
|
|
5
|
-
const style = {
|
|
6
|
-
iconImage: headingIcon,
|
|
7
|
-
iconAllowOverlap: true,
|
|
8
|
-
iconPitchAlignment: "map",
|
|
9
|
-
iconRotationAlignment: "map",
|
|
10
|
-
} as const;
|
|
11
|
-
|
|
12
|
-
interface HeadingIndicatorProps extends BaseProps {
|
|
13
|
-
heading?: number;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const HeadingIndicator = ({ heading }: HeadingIndicatorProps) => (
|
|
17
|
-
<SymbolLayer
|
|
18
|
-
key="mapboxUserLocationHeadingIndicator"
|
|
19
|
-
id="mapboxUserLocationHeadingIndicator"
|
|
20
|
-
belowLayerID="mapboxUserLocationWhiteCircle"
|
|
21
|
-
style={{
|
|
22
|
-
iconRotate: heading,
|
|
23
|
-
...style,
|
|
24
|
-
}}
|
|
25
|
-
/>
|
|
26
|
-
);
|