react-native-maps 1.21.0-alpha.79 → 1.21.0-alpha.80
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/generated/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerDelegate.java +58 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerInterface.java +27 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.cpp +1 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.h +1 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +22 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/EventEmitters.h +22 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/Props.cpp +15 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/Props.h +83 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.cpp +1 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.h +11 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/States.h +12 -0
- package/android/src/main/java/com/rnmaps/fabric/PolylineManager.java +121 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnPanDragEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +5 -1
- package/android/src/main/java/com/rnmaps/maps/MapPolyline.java +207 -141
- package/android/src/main/java/com/rnmaps/maps/MapPolylineManager.java +1 -16
- package/android/src/main/java/com/rnmaps/maps/MapView.java +2 -3
- package/ios/generated/RNMapsSpecs/ComponentDescriptors.cpp +1 -0
- package/ios/generated/RNMapsSpecs/ComponentDescriptors.h +1 -0
- package/ios/generated/RNMapsSpecs/EventEmitters.cpp +22 -0
- package/ios/generated/RNMapsSpecs/EventEmitters.h +22 -0
- package/ios/generated/RNMapsSpecs/Props.cpp +15 -0
- package/ios/generated/RNMapsSpecs/Props.h +83 -0
- package/ios/generated/RNMapsSpecs/RCTComponentViewHelpers.h +4 -0
- package/ios/generated/RNMapsSpecs/ShadowNodes.cpp +1 -0
- package/ios/generated/RNMapsSpecs/ShadowNodes.h +11 -0
- package/ios/generated/RNMapsSpecs/States.h +12 -0
- package/lib/MapCallout.js +0 -1
- package/lib/MapPolyline.d.ts +5 -5
- package/lib/decorateMapComponent.js +10 -3
- package/lib/specs/NativeComponentPolyline.d.ts +101 -0
- package/lib/specs/NativeComponentPolyline.js +7 -0
- package/package.json +1 -1
package/lib/MapPolyline.d.ts
CHANGED
|
@@ -32,8 +32,8 @@ export type MapPolylineProps = ViewProps & {
|
|
|
32
32
|
*
|
|
33
33
|
* @default `round`
|
|
34
34
|
* @platform iOS: Apple Maps only
|
|
35
|
-
* @platform Android:
|
|
36
|
-
*/
|
|
35
|
+
* @platform Android: supported
|
|
36
|
+
* */
|
|
37
37
|
lineCap?: LineCapType;
|
|
38
38
|
/**
|
|
39
39
|
* An array of numbers specifying the dash pattern to use for the path.
|
|
@@ -42,8 +42,8 @@ export type MapPolylineProps = ViewProps & {
|
|
|
42
42
|
* The values in the array alternate, starting with the first line segment length,
|
|
43
43
|
* followed by the first gap length, followed by the second line segment length, and so on.
|
|
44
44
|
*
|
|
45
|
-
* @platform iOS:
|
|
46
|
-
* @platform Android:
|
|
45
|
+
* @platform iOS: Apple Maps only
|
|
46
|
+
* @platform Android: supported
|
|
47
47
|
*/
|
|
48
48
|
lineDashPattern?: number[];
|
|
49
49
|
/**
|
|
@@ -60,7 +60,7 @@ export type MapPolylineProps = ViewProps & {
|
|
|
60
60
|
* The line join style to apply to corners of the path.
|
|
61
61
|
*
|
|
62
62
|
* @platform iOS: Apple Maps only
|
|
63
|
-
* @platform Android:
|
|
63
|
+
* @platform Android: supported
|
|
64
64
|
*/
|
|
65
65
|
lineJoin?: LineJoinType;
|
|
66
66
|
/**
|
|
@@ -10,6 +10,7 @@ const ProviderConstants_1 = require("./ProviderConstants");
|
|
|
10
10
|
const NativeComponentGooglePolygon_1 = __importDefault(require("./specs/NativeComponentGooglePolygon"));
|
|
11
11
|
const NativeComponentMarker_1 = __importDefault(require("./specs/NativeComponentMarker"));
|
|
12
12
|
const NativeComponentCallout_1 = __importDefault(require("./specs/NativeComponentCallout"));
|
|
13
|
+
const NativeComponentPolyline_1 = __importDefault(require("./specs/NativeComponentPolyline"));
|
|
13
14
|
exports.SUPPORTED = 'SUPPORTED';
|
|
14
15
|
exports.USES_DEFAULT_IMPLEMENTATION = 'USES_DEFAULT_IMPLEMENTATION';
|
|
15
16
|
exports.NOT_SUPPORTED = 'NOT_SUPPORTED';
|
|
@@ -53,9 +54,15 @@ function decorateMapComponent(Component, componentName, providers) {
|
|
|
53
54
|
// @ts-ignore
|
|
54
55
|
return NativeComponentGooglePolygon_1.default;
|
|
55
56
|
}
|
|
56
|
-
if (
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
if (react_native_1.Platform.OS === 'android') {
|
|
58
|
+
if (componentName === 'Callout') {
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
return NativeComponentCallout_1.default;
|
|
61
|
+
}
|
|
62
|
+
else if (componentName === 'Polyline') {
|
|
63
|
+
// @ts-ignore
|
|
64
|
+
return NativeComponentPolyline_1.default;
|
|
65
|
+
}
|
|
59
66
|
}
|
|
60
67
|
const key = provider || 'default';
|
|
61
68
|
if (components[key]) {
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps, ColorValue } from 'react-native';
|
|
2
|
+
import { Double, Float, BubblingEventHandler, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
export type LatLng = Readonly<{
|
|
4
|
+
latitude: Double;
|
|
5
|
+
longitude: Double;
|
|
6
|
+
}>;
|
|
7
|
+
export type PolylinePressEventHandler = BubblingEventHandler<Readonly<{
|
|
8
|
+
action?: string;
|
|
9
|
+
id: string;
|
|
10
|
+
coordinate: {
|
|
11
|
+
latitude: Double;
|
|
12
|
+
longitude: Double;
|
|
13
|
+
};
|
|
14
|
+
position?: {
|
|
15
|
+
x: Double;
|
|
16
|
+
y: Double;
|
|
17
|
+
};
|
|
18
|
+
}>>;
|
|
19
|
+
export interface PolylineFabricNativeProps extends ViewProps {
|
|
20
|
+
/**
|
|
21
|
+
* An array of coordinates to describe the polygon
|
|
22
|
+
*
|
|
23
|
+
* @platform iOS: Supported
|
|
24
|
+
* @platform Android: Supported
|
|
25
|
+
*/
|
|
26
|
+
coordinates: ReadonlyArray<LatLng>;
|
|
27
|
+
/**
|
|
28
|
+
* Boolean to indicate whether to draw each segment of the line as a geodesic as opposed to straight lines on the Mercator projection.
|
|
29
|
+
* A geodesic is the shortest path between two points on the Earth's surface.
|
|
30
|
+
* The geodesic curve is constructed assuming the Earth is a sphere.
|
|
31
|
+
*
|
|
32
|
+
* @platform iOS: Google Maps only
|
|
33
|
+
* @platform Android: Supported
|
|
34
|
+
*/
|
|
35
|
+
geodesic?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The line cap style to apply to the open ends of the path
|
|
38
|
+
*
|
|
39
|
+
* @default `round`
|
|
40
|
+
* @platform iOS: Apple Maps only
|
|
41
|
+
* @platform Android: supported
|
|
42
|
+
* */
|
|
43
|
+
lineCap?: WithDefault<'butt' | 'round' | 'square', 'butt'>;
|
|
44
|
+
/**
|
|
45
|
+
* An array of numbers specifying the dash pattern to use for the path.
|
|
46
|
+
* The array contains one or more numbers that indicate the lengths (measured in points)
|
|
47
|
+
* of the line segments and gaps in the pattern.
|
|
48
|
+
* The values in the array alternate, starting with the first line segment length,
|
|
49
|
+
* followed by the first gap length, followed by the second line segment length, and so on.
|
|
50
|
+
*
|
|
51
|
+
* @platform iOS: Apple Maps only
|
|
52
|
+
* @platform Android: supported
|
|
53
|
+
*/
|
|
54
|
+
lineDashPattern?: ReadonlyArray<Double>;
|
|
55
|
+
/**
|
|
56
|
+
* The line join style to apply to corners of the path.
|
|
57
|
+
*
|
|
58
|
+
* @platform iOS: Apple Maps only
|
|
59
|
+
* @platform Android: supported
|
|
60
|
+
*/
|
|
61
|
+
lineJoin?: WithDefault<'miter' | 'round' | 'bevel', 'miter'>;
|
|
62
|
+
/**
|
|
63
|
+
* Callback that is called when user taps on the map.
|
|
64
|
+
*
|
|
65
|
+
* @platform iOS: Supported
|
|
66
|
+
* @platform Android: Supported
|
|
67
|
+
*/
|
|
68
|
+
onPress?: PolylinePressEventHandler;
|
|
69
|
+
/**
|
|
70
|
+
* The stroke color to use for the path.
|
|
71
|
+
*
|
|
72
|
+
* @default `#000`, `rgba(r,g,b,0.5)`
|
|
73
|
+
* @platform iOS: Supported
|
|
74
|
+
* @platform Android: Supported
|
|
75
|
+
*/
|
|
76
|
+
strokeColor?: ColorValue;
|
|
77
|
+
/**
|
|
78
|
+
* The stroke colors to use for the path.
|
|
79
|
+
* @default `#000`, `rgba(r,g,b,0.5)`
|
|
80
|
+
* @platform iOS: Supported
|
|
81
|
+
* @platform Android: Supported
|
|
82
|
+
*/
|
|
83
|
+
strokeColors?: ReadonlyArray<ColorValue>;
|
|
84
|
+
/**
|
|
85
|
+
* The stroke width to use for the path.
|
|
86
|
+
*
|
|
87
|
+
* @default 1
|
|
88
|
+
* @platform iOS: Supported
|
|
89
|
+
* @platform Android: Supported
|
|
90
|
+
*/
|
|
91
|
+
strokeWidth?: Float;
|
|
92
|
+
/**
|
|
93
|
+
* Boolean to allow a polygon to be tappable and use the onPress function.
|
|
94
|
+
*
|
|
95
|
+
* @platform iOS: Google Maps only
|
|
96
|
+
* @platform Android: Supported
|
|
97
|
+
*/
|
|
98
|
+
tappable?: boolean;
|
|
99
|
+
}
|
|
100
|
+
declare const _default: HostComponent<PolylineFabricNativeProps>;
|
|
101
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const codegenNativeComponent_1 = __importDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
|
|
7
|
+
exports.default = (0, codegenNativeComponent_1.default)('RNMapsPolyline', {});
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"author": "Leland Richardson <leland.m.richardson@gmail.com>",
|
|
7
7
|
"homepage": "https://github.com/react-native-maps/react-native-maps#readme",
|
|
8
|
-
"version": "1.21.0-alpha.
|
|
8
|
+
"version": "1.21.0-alpha.80",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|