react-native-maps 1.28.2 → 1.29.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/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.cpp +2 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.h +2 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +175 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.h +157 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.cpp +183 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.h +431 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.cpp +2 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.h +22 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.h +4 -0
- package/dist/src/specs/NativeComponentGoogleMarker.d.ts +250 -0
- package/dist/src/specs/NativeComponentPolygon.d.ts +108 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/ios/AirGoogleMaps/AIRGoogleMapMarker.h +3 -0
- package/ios/AirGoogleMaps/AIRGoogleMapMarker.m +6 -2
- package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +8 -0
- package/ios/AirGoogleMaps/RNMapsGoogleMarkerView.h +28 -0
- package/ios/AirGoogleMaps/RNMapsGoogleMarkerView.mm +357 -0
- package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMarkerView.h +24 -0
- package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMarkerView.mm +64 -0
- package/ios/AirMaps/RNMapsMapView.mm +8 -0
- package/ios/AirMaps/RNMapsPolygonView.h +26 -0
- package/ios/AirMaps/RNMapsPolygonView.mm +240 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.mm +2 -0
- package/ios/generated/RNMapsSpecs/ComponentDescriptors.cpp +2 -0
- package/ios/generated/RNMapsSpecs/ComponentDescriptors.h +2 -0
- package/ios/generated/RNMapsSpecs/EventEmitters.cpp +175 -0
- package/ios/generated/RNMapsSpecs/EventEmitters.h +157 -0
- package/ios/generated/RNMapsSpecs/Props.cpp +178 -0
- package/ios/generated/RNMapsSpecs/Props.h +379 -0
- package/ios/generated/RNMapsSpecs/RCTComponentViewHelpers.h +143 -0
- package/ios/generated/RNMapsSpecs/ShadowNodes.cpp +2 -0
- package/ios/generated/RNMapsSpecs/ShadowNodes.h +22 -0
- package/ios/generated/RNMapsSpecs/States.h +4 -0
- package/package.json +4 -2
- package/src/MapMarker.tsx +4 -3
- package/src/decorateMapComponent.ts +29 -15
- package/src/specs/NativeComponentGoogleMarker.ts +327 -0
- package/src/specs/NativeComponentPolygon.ts +137 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import type {HostComponent, ViewProps, ColorValue} from 'react-native';
|
|
2
|
+
|
|
3
|
+
import {codegenNativeComponent} from 'react-native';
|
|
4
|
+
import type {
|
|
5
|
+
Double,
|
|
6
|
+
BubblingEventHandler,
|
|
7
|
+
Float,
|
|
8
|
+
WithDefault,
|
|
9
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
10
|
+
|
|
11
|
+
export type LatLng = Readonly<{
|
|
12
|
+
latitude: Double; // Non-nullable Double for latitude
|
|
13
|
+
longitude: Double; // Non-nullable Double for longitude
|
|
14
|
+
}>;
|
|
15
|
+
|
|
16
|
+
export type PolygonPressEventHandler = BubblingEventHandler<
|
|
17
|
+
Readonly<{
|
|
18
|
+
action?: string;
|
|
19
|
+
id: string;
|
|
20
|
+
coordinate: {
|
|
21
|
+
latitude: Double; // Inlined LatLng
|
|
22
|
+
longitude: Double;
|
|
23
|
+
};
|
|
24
|
+
position?: {
|
|
25
|
+
x: Double; // Inlined Point
|
|
26
|
+
y: Double;
|
|
27
|
+
};
|
|
28
|
+
}>
|
|
29
|
+
>;
|
|
30
|
+
|
|
31
|
+
type LineCapType = 'butt' | 'round' | 'square';
|
|
32
|
+
type LineJoinType = 'miter' | 'round' | 'bevel';
|
|
33
|
+
|
|
34
|
+
export interface ApplePolygonFabricNativeProps extends ViewProps {
|
|
35
|
+
/**
|
|
36
|
+
* An array of coordinates to describe the polygon
|
|
37
|
+
*
|
|
38
|
+
* @platform iOS: Supported
|
|
39
|
+
* @platform Android: Supported
|
|
40
|
+
*/
|
|
41
|
+
coordinates: ReadonlyArray<LatLng>;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The fill color to use for the path.
|
|
45
|
+
*
|
|
46
|
+
* @default `#000`, `rgba(r,g,b,0.5)`
|
|
47
|
+
* @platform iOS: Supported
|
|
48
|
+
* @platform Android: Supported
|
|
49
|
+
*/
|
|
50
|
+
fillColor?: ColorValue;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The stroke color to use for the path.
|
|
54
|
+
*
|
|
55
|
+
* @default `#000`, `rgba(r,g,b,0.5)`
|
|
56
|
+
* @platform iOS: Supported
|
|
57
|
+
* @platform Android: Supported
|
|
58
|
+
*/
|
|
59
|
+
strokeColor?: ColorValue;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The stroke width to use for the path.
|
|
63
|
+
*
|
|
64
|
+
* @default 1
|
|
65
|
+
* @platform iOS: Supported
|
|
66
|
+
* @platform Android: Supported
|
|
67
|
+
*/
|
|
68
|
+
strokeWidth?: WithDefault<Float, 1.0>;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* A 2d array of coordinates to describe holes of the polygon where each hole
|
|
72
|
+
* has at least 3 points.
|
|
73
|
+
*
|
|
74
|
+
* @platform iOS: Supported
|
|
75
|
+
* @platform Android: Supported
|
|
76
|
+
*/
|
|
77
|
+
holes?: ReadonlyArray<ReadonlyArray<LatLng>>;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The line cap style to use for the open ends of the stroke path.
|
|
81
|
+
*
|
|
82
|
+
* @default round
|
|
83
|
+
* @platform iOS: Apple Maps only
|
|
84
|
+
* @platform Android: Not supported
|
|
85
|
+
*/
|
|
86
|
+
lineCap?: WithDefault<LineCapType, 'round'>;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The line join style to use for the corners of the stroke path.
|
|
90
|
+
*
|
|
91
|
+
* @default round
|
|
92
|
+
* @platform iOS: Apple Maps only
|
|
93
|
+
* @platform Android: Not supported
|
|
94
|
+
*/
|
|
95
|
+
lineJoin?: WithDefault<LineJoinType, 'round'>;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The limiting value that helps avoid spikes at junctions between connected
|
|
99
|
+
* line segments.
|
|
100
|
+
*
|
|
101
|
+
* @platform iOS: Apple Maps only
|
|
102
|
+
* @platform Android: Not supported
|
|
103
|
+
*/
|
|
104
|
+
miterLimit?: WithDefault<Float, 10.0>;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The phase at which to start the line dash pattern.
|
|
108
|
+
*
|
|
109
|
+
* @platform iOS: Apple Maps only
|
|
110
|
+
* @platform Android: Not supported
|
|
111
|
+
*/
|
|
112
|
+
lineDashPhase?: WithDefault<Float, 0.0>;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* An array of numbers specifying the dash pattern to use for the path.
|
|
116
|
+
*
|
|
117
|
+
* @platform iOS: Apple Maps only
|
|
118
|
+
* @platform Android: Supported
|
|
119
|
+
*/
|
|
120
|
+
lineDashPattern?: ReadonlyArray<Float>;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Callback that is called when the user taps the polygon.
|
|
124
|
+
*
|
|
125
|
+
* @platform iOS: Supported
|
|
126
|
+
* @platform Android: Supported
|
|
127
|
+
*/
|
|
128
|
+
onPress?: PolygonPressEventHandler;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export default codegenNativeComponent<ApplePolygonFabricNativeProps>(
|
|
132
|
+
'RNMapsPolygon',
|
|
133
|
+
{
|
|
134
|
+
// iOS-only: on Android, polygons use the shared `RNMapsGooglePolygon` component.
|
|
135
|
+
excludedPlatforms: ['android'],
|
|
136
|
+
},
|
|
137
|
+
) as HostComponent<ApplePolygonFabricNativeProps>;
|