react-native-maps 1.21.0-alpha.10 → 1.21.0-alpha.100
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/build.gradle +77 -57
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/gradlew +1 -2
- package/android/src/main/java/com/rnmaps/fabric/CalloutManager.java +77 -0
- package/android/src/main/java/com/rnmaps/fabric/CircleManager.java +94 -0
- package/android/src/main/java/com/rnmaps/fabric/JSONUtil.java +86 -0
- package/android/src/main/java/com/rnmaps/fabric/MapViewManager.java +619 -0
- package/android/src/main/java/com/rnmaps/fabric/MarkerManager.java +258 -0
- package/android/src/main/java/com/rnmaps/fabric/NativeAirMapsModule.java +235 -2
- package/android/src/main/java/com/rnmaps/fabric/OverlayManager.java +95 -0
- package/android/src/main/java/com/rnmaps/fabric/PolygonManager.java +89 -0
- package/android/src/main/java/com/rnmaps/fabric/PolylineManager.java +121 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnCalloutPressEvent.java +25 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnDeselectEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnDoublePressEvent.java +27 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnDragEndEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnDragEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnDragStartEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnIndoorBuildingFocusedEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnIndoorLevelActivatedEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnKmlReadyEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnLongPressEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnMapLoadedEvent.java +29 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnMapReadyEvent.java +29 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDeselectEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDragEndEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDragEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDragStartEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerPressEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerSelectEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnPanDragEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnPoiClickEvent.java +27 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnPressEvent.java +27 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnRegionChangeCompleteEvent.java +30 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnRegionChangeEvent.java +48 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnRegionChangeStartEvent.java +33 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnSelectEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnUserLocationChangeEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +39 -3
- package/android/src/main/java/com/rnmaps/maps/MapCallout.java +18 -0
- package/android/src/main/java/com/rnmaps/maps/MapCircle.java +24 -0
- package/android/src/main/java/com/rnmaps/maps/MapManager.java +14 -14
- package/android/src/main/java/com/rnmaps/maps/MapMarker.java +79 -3
- package/android/src/main/java/com/rnmaps/maps/MapModule.java +206 -206
- package/android/src/main/java/com/rnmaps/maps/MapOverlay.java +267 -151
- package/android/src/main/java/com/rnmaps/maps/MapPolygon.java +31 -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 +1654 -1337
- package/ios/AirGoogleMaps/AIRGoogleMap.m +102 -58
- package/ios/AirGoogleMaps/AIRGoogleMapCircle.m +23 -11
- package/ios/AirGoogleMaps/AIRGoogleMapManager.m +3 -1
- package/ios/AirGoogleMaps/AIRGoogleMapMarker.h +2 -0
- package/ios/AirGoogleMaps/AIRGoogleMapMarker.m +347 -243
- package/ios/AirGoogleMaps/AIRGoogleMapPolygon.h +2 -1
- package/ios/AirGoogleMaps/AIRGoogleMapPolygon.m +30 -0
- package/ios/AirGoogleMaps/AIRGoogleMapPolyline.h +0 -1
- package/ios/AirGoogleMaps/AIRGoogleMapPolyline.m +0 -7
- package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.h +1 -1
- package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.m +2 -2
- package/ios/AirGoogleMaps/RCTConvert+GMSMapViewType.m +2 -0
- package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +143 -54
- package/ios/AirGoogleMaps/RNMapsGooglePolygonView.h +26 -0
- package/ios/AirGoogleMaps/RNMapsGooglePolygonView.mm +217 -0
- package/ios/AirGoogleMaps/RNMapsGooglePolygonViewManager.mm +25 -0
- package/ios/AirMaps/AIRMap.h +2 -1
- package/ios/AirMaps/AIRMap.m +227 -236
- package/ios/AirMaps/AIRMapManager.m +6 -0
- package/ios/AirMaps/AIRMapMarker.h +1 -0
- package/ios/AirMaps/AIRMapMarker.m +165 -103
- package/ios/AirMaps/Callout/SMCalloutView.m +1 -1
- package/ios/AirMaps/RNMapsAirModule.h +1 -1
- package/ios/AirMaps/RNMapsAirModule.mm +4 -3
- package/ios/AirMaps/RNMapsAirModuleDelegate.h +24 -0
- package/ios/AirMaps/RNMapsHostVewDelegate.h +17 -0
- package/ios/AirMaps/RNMapsMapView.mm +335 -303
- package/ios/AirMaps/RNMapsMarkerView.h +24 -0
- package/ios/AirMaps/RNMapsMarkerView.mm +430 -0
- package/ios/AirMaps/RNMapsMarkerViewManager.mm +21 -0
- package/ios/AirMaps/UIView +AirMap.m +20 -0
- package/ios/AirMaps/UIView+AirMap.h +11 -0
- package/ios/AirMaps.xcodeproj/project.pbxproj +60 -0
- package/lib/MapCircle.d.ts +1 -1
- package/lib/MapHeatmap.d.ts +2 -2
- package/lib/MapHeatmap.js +1 -1
- package/lib/MapMarker.d.ts +16 -3
- package/lib/MapMarker.js +55 -13
- package/lib/MapMarkerNativeComponent.js +0 -2
- package/lib/MapOverlay.d.ts +1 -0
- package/lib/MapOverlay.js +11 -9
- package/lib/MapPolygon.d.ts +1 -1
- package/lib/MapPolyline.d.ts +7 -7
- package/lib/MapView.d.ts +15 -27
- package/lib/MapView.js +109 -124
- package/lib/MapView.types.d.ts +1 -1
- package/lib/createFabricMap.d.ts +1 -0
- package/lib/createFabricMap.js +17 -4
- package/lib/decorateMapComponent.js +40 -0
- package/lib/fixImageProp.d.ts +4 -0
- package/lib/fixImageProp.js +16 -0
- package/lib/specs/NativeAirMapsModule.d.ts +2 -2
- package/lib/specs/NativeComponentCallout.d.ts +46 -0
- package/lib/specs/NativeComponentCallout.js +9 -0
- package/lib/specs/NativeComponentCircle.d.ts +74 -0
- package/lib/specs/NativeComponentCircle.js +7 -0
- package/lib/specs/NativeComponentGoogleMapView.d.ts +15 -15
- package/lib/specs/NativeComponentGoogleMapView.js +1 -0
- package/lib/specs/NativeComponentGooglePolygon.d.ts +75 -0
- package/lib/specs/NativeComponentGooglePolygon.js +7 -0
- package/lib/specs/NativeComponentMapView.d.ts +28 -36
- package/lib/specs/NativeComponentMapView.js +2 -3
- package/lib/specs/NativeComponentMarker.d.ts +258 -0
- package/lib/specs/NativeComponentMarker.js +19 -0
- package/lib/specs/NativeComponentOverlay.d.ts +67 -0
- package/lib/specs/NativeComponentOverlay.js +7 -0
- package/lib/specs/NativeComponentPolyline.d.ts +101 -0
- package/lib/specs/NativeComponentPolyline.js +7 -0
- package/package.json +24 -22
- package/react-native-maps.podspec +61 -16
- package/specs/NativeAirMapsModule.ts +36 -0
- package/specs/NativeComponentCallout.ts +63 -0
- package/specs/NativeComponentCircle.ts +94 -0
- package/specs/NativeComponentGoogleMapView.ts +916 -0
- package/specs/NativeComponentGooglePolygon.ts +94 -0
- package/specs/NativeComponentMapView.ts +1071 -0
- package/specs/NativeComponentMarker.ts +326 -0
- package/specs/NativeComponentOverlay.ts +89 -0
- package/specs/NativeComponentPolyline.ts +124 -0
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
exports.Commands = void 0;
|
|
7
|
+
const codegenNativeComponent_1 = __importDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
|
|
8
|
+
const codegenNativeCommands_1 = __importDefault(require("react-native/Libraries/Utilities/codegenNativeCommands"));
|
|
9
|
+
exports.Commands = (0, codegenNativeCommands_1.default)({
|
|
10
|
+
supportedCommands: [
|
|
11
|
+
'setCoordinates',
|
|
12
|
+
'animateToCoordinates',
|
|
13
|
+
'showCallout',
|
|
14
|
+
'hideCallout',
|
|
15
|
+
'redrawCallout',
|
|
16
|
+
'redraw',
|
|
17
|
+
],
|
|
18
|
+
});
|
|
19
|
+
exports.default = (0, codegenNativeComponent_1.default)('RNMapsMarker', {});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Double, Float, BubblingEventHandler, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
2
|
+
import type { ViewProps, HostComponent, ImageSourcePropType as ImageSource } from 'react-native';
|
|
3
|
+
export type LatLng = Readonly<{
|
|
4
|
+
latitude: Double;
|
|
5
|
+
longitude: Double;
|
|
6
|
+
}>;
|
|
7
|
+
export type OverlayPressEventHandler = 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 OverlayFabricNativeProps extends ViewProps {
|
|
20
|
+
/**
|
|
21
|
+
* The bearing in degrees clockwise from north. Values outside the range [0, 360) will be normalized.
|
|
22
|
+
*
|
|
23
|
+
* @default 0
|
|
24
|
+
* @platform iOS: Google Maps only
|
|
25
|
+
* @platform Android: Supported
|
|
26
|
+
*/
|
|
27
|
+
bearing?: Float;
|
|
28
|
+
/**
|
|
29
|
+
* The coordinates for the image (left-top corner, right-bottom corner). ie.```[[lat, long], [lat, long]]```
|
|
30
|
+
*
|
|
31
|
+
* @platform iOS: Supported
|
|
32
|
+
* @platform Android: Supported
|
|
33
|
+
*/
|
|
34
|
+
bounds: ReadonlyArray<LatLng>;
|
|
35
|
+
/**
|
|
36
|
+
* A custom image to be used as the overlay.
|
|
37
|
+
* Only required local image resources and uri (as for images located in the net) are allowed to be used.
|
|
38
|
+
*
|
|
39
|
+
* @platform iOS: Supported
|
|
40
|
+
* @platform Android: Supported
|
|
41
|
+
*/
|
|
42
|
+
image?: ImageSource | null;
|
|
43
|
+
/**
|
|
44
|
+
* Callback that is called when user taps on the map.
|
|
45
|
+
*
|
|
46
|
+
* @platform iOS: Supported
|
|
47
|
+
* @platform Android: Supported
|
|
48
|
+
*/
|
|
49
|
+
onPress?: OverlayPressEventHandler;
|
|
50
|
+
/**
|
|
51
|
+
* The overlay's opacity between 0.0 and 1.0.
|
|
52
|
+
*
|
|
53
|
+
* @default 1.0
|
|
54
|
+
* @platform iOS: Supported
|
|
55
|
+
* @platform Android: Supported
|
|
56
|
+
*/
|
|
57
|
+
opacity?: WithDefault<Float, 1.0>;
|
|
58
|
+
/**
|
|
59
|
+
* Boolean to allow a polygon to be tappable and use the onPress function.
|
|
60
|
+
*
|
|
61
|
+
* @platform iOS: Google Maps only
|
|
62
|
+
* @platform Android: Supported
|
|
63
|
+
*/
|
|
64
|
+
tappable?: boolean;
|
|
65
|
+
}
|
|
66
|
+
declare const _default: HostComponent<OverlayFabricNativeProps>;
|
|
67
|
+
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)('RNMapsOverlay', {});
|
|
@@ -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.100",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|
|
@@ -17,9 +17,11 @@
|
|
|
17
17
|
"release": "semantic-release",
|
|
18
18
|
"bundle-install": "cd example && bundle install",
|
|
19
19
|
"pod-install": "cd example/ios && bundle exec pod install",
|
|
20
|
-
"bootstrap": "yarn --cwd example && yarn && yarn bundle-install && yarn pod-install"
|
|
20
|
+
"bootstrap": "yarn --cwd example && yarn && yarn bundle-install && yarn pod-install",
|
|
21
|
+
"prepack": "node updateCodegenConfig.js"
|
|
21
22
|
},
|
|
22
23
|
"files": [
|
|
24
|
+
"specs",
|
|
23
25
|
"lib",
|
|
24
26
|
"android",
|
|
25
27
|
"ios",
|
|
@@ -44,8 +46,8 @@
|
|
|
44
46
|
"mapkit"
|
|
45
47
|
],
|
|
46
48
|
"peerDependencies": {
|
|
47
|
-
"react": ">=
|
|
48
|
-
"react-native": ">= 0.
|
|
49
|
+
"react": ">= 19.0.0",
|
|
50
|
+
"react-native": ">= 0.78.0",
|
|
49
51
|
"react-native-web": ">= 0.11"
|
|
50
52
|
},
|
|
51
53
|
"peerDependenciesMeta": {
|
|
@@ -54,30 +56,30 @@
|
|
|
54
56
|
}
|
|
55
57
|
},
|
|
56
58
|
"devDependencies": {
|
|
59
|
+
"@babel/core": "^7.26.9",
|
|
60
|
+
"@babel/preset-env": "^7.26.9",
|
|
61
|
+
"@babel/runtime": "^7.26.9",
|
|
57
62
|
"@commitlint/cli": "17.6.1",
|
|
58
63
|
"@commitlint/config-conventional": "17.6.1",
|
|
64
|
+
"@react-native-community/cli": "15.1.3",
|
|
65
|
+
"@react-native/babel-preset": "0.78.0",
|
|
66
|
+
"@react-native/eslint-config": "0.78.0",
|
|
67
|
+
"@react-native/metro-config": "0.78.0",
|
|
68
|
+
"@react-native/typescript-config": "0.78.0",
|
|
59
69
|
"@semantic-release/changelog": "6.0.3",
|
|
60
70
|
"@semantic-release/git": "10.0.1",
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"@types/react-native": "0.
|
|
64
|
-
"@
|
|
65
|
-
"@babel/preset-env": "^7.25.3",
|
|
66
|
-
"@babel/runtime": "^7.25.0",
|
|
67
|
-
"react-native": "^0.76.5",
|
|
68
|
-
"react": "^18.3.1",
|
|
69
|
-
"@react-native/babel-preset": "0.76.5",
|
|
70
|
-
"@react-native/eslint-config": "0.76.5",
|
|
71
|
-
"@react-native/metro-config": "0.76.5",
|
|
72
|
-
"@react-native/typescript-config": "0.76.5",
|
|
73
|
-
"@types/react": "^18.2.6",
|
|
74
|
-
"@types/react-test-renderer": "^18.0.0",
|
|
75
|
-
"babel-jest": "^29.6.3",
|
|
71
|
+
"@types/jest": "29.5.14",
|
|
72
|
+
"@types/react": "^19.0.10",
|
|
73
|
+
"@types/react-native": "0.73.0",
|
|
74
|
+
"@types/react-test-renderer": "^19.0.0",
|
|
76
75
|
"eslint": "^8.19.0",
|
|
77
|
-
"
|
|
76
|
+
"husky": "8.0.3",
|
|
78
77
|
"jest": "^29.6.3",
|
|
79
78
|
"prettier": "2.8.8",
|
|
80
|
-
"react
|
|
79
|
+
"react": "^19.0.0",
|
|
80
|
+
"react-native": "^0.78.0",
|
|
81
|
+
"react-test-renderer": "19.0.0",
|
|
82
|
+
"semantic-release": "24.2.0",
|
|
81
83
|
"typescript": "5.0.4"
|
|
82
84
|
},
|
|
83
85
|
"dependencies": {
|
|
@@ -93,7 +95,7 @@
|
|
|
93
95
|
"codegenConfig": {
|
|
94
96
|
"name": "RNMapsSpecs",
|
|
95
97
|
"type": "all",
|
|
96
|
-
"jsSrcsDir": "./
|
|
98
|
+
"jsSrcsDir": "./specs",
|
|
97
99
|
"android": {
|
|
98
100
|
"javaPackageName": "com.rnmaps.fabric"
|
|
99
101
|
}
|
|
@@ -1,22 +1,67 @@
|
|
|
1
1
|
require 'json'
|
|
2
|
-
|
|
3
2
|
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
3
|
|
|
4
|
+
folly_config = get_folly_config()
|
|
5
|
+
folly_compiler_flags = folly_config[:compiler_flags]
|
|
6
|
+
|
|
5
7
|
Pod::Spec.new do |s|
|
|
6
|
-
s.name
|
|
7
|
-
s.version
|
|
8
|
-
s.summary
|
|
9
|
-
s.authors
|
|
10
|
-
s.homepage
|
|
11
|
-
s.license
|
|
12
|
-
s.platform
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
s.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
s.
|
|
8
|
+
s.name = "react-native-maps"
|
|
9
|
+
s.version = package['version']
|
|
10
|
+
s.summary = package["description"]
|
|
11
|
+
s.authors = package["author"]
|
|
12
|
+
s.homepage = package["homepage"]
|
|
13
|
+
s.license = package["license"]
|
|
14
|
+
s.platform = :ios, "13.0"
|
|
15
|
+
s.source = { :git => "https://github.com/react-native-maps/react-native-maps.git", :tag=> "v#{s.version}" }
|
|
16
|
+
|
|
17
|
+
# Define the default base subspec
|
|
18
|
+
s.default_subspec = 'base'
|
|
19
|
+
|
|
20
|
+
# Base subspec for standard maps
|
|
21
|
+
s.subspec 'base' do |sp|
|
|
22
|
+
sp.source_files = "ios/AirMaps/**/*.{h,m,mm,swift}"
|
|
23
|
+
sp.dependency "React-Core"
|
|
24
|
+
sp.dependency "react-native-maps/generated"
|
|
25
|
+
sp.compiler_flags = folly_compiler_flags
|
|
26
|
+
install_modules_dependencies(sp)
|
|
27
|
+
end
|
|
20
28
|
|
|
21
|
-
|
|
29
|
+
# Separate subspec for Google Maps support
|
|
30
|
+
s.subspec 'google-maps' do |sp|
|
|
31
|
+
sp.platform = :ios, "15.0"
|
|
32
|
+
sp.source_files = "ios/AirGoogleMaps/**/*.{h,m,mm,swift}"
|
|
33
|
+
sp.resource_bundles = {
|
|
34
|
+
'GoogleMapsPrivacy' => ['ios/AirGoogleMaps/Resources/GoogleMapsPrivacy.bundle']
|
|
35
|
+
}
|
|
36
|
+
sp.compiler_flags = folly_compiler_flags + ' -DHAVE_GOOGLE_MAPS=1 -DHAVE_GOOGLE_MAPS_UTILS=1'
|
|
37
|
+
sp.dependency "react-native-maps/generated"
|
|
38
|
+
sp.dependency 'GoogleMaps', '9.3.0'
|
|
39
|
+
sp.dependency 'Google-Maps-iOS-Utils', '6.1.0'
|
|
40
|
+
install_modules_dependencies(sp)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Generated podspec as a subspec
|
|
44
|
+
s.subspec 'generated' do |sp|
|
|
45
|
+
sp.source_files = 'ios/generated/**/*.{h,m,mm,cpp}'
|
|
46
|
+
sp.exclude_files = [
|
|
47
|
+
'ios/generated/**/RCTAppDependencyProvider.{h,mm}',
|
|
48
|
+
'ios/generated/**/RCTThirdPartyComponentsProvider.{h,mm}',
|
|
49
|
+
'ios/generated/**/RCTModulesConformingToProtocolsProvider.{h,mm}'
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
sp.public_header_files = [
|
|
54
|
+
'ios/generated/react-native-maps-generated-umbrella.h',
|
|
55
|
+
'ios/generated/RNMapsSpecs/ComponentDescriptors.h',
|
|
56
|
+
'ios/generated/RNMapsSpecs/EventEmitters.h',
|
|
57
|
+
'ios/generated/RNMapsSpecs/Props.h',
|
|
58
|
+
'ios/generated/RNMapsSpecs/RCTComponentViewHelpers.h',
|
|
59
|
+
'ios/generated/RNMapsSpecs/RNMapsSpecs.h'
|
|
60
|
+
]
|
|
61
|
+
sp.header_mappings_dir = 'ios/generated'
|
|
62
|
+
sp.resource_bundles = {
|
|
63
|
+
'ReactNativeMapsPrivacy' => ['ios/PrivacyInfo.xcprivacy']
|
|
64
|
+
}
|
|
65
|
+
install_modules_dependencies(sp)
|
|
66
|
+
end
|
|
22
67
|
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type {TurboModule} from 'react-native';
|
|
2
|
+
import {TurboModuleRegistry} from 'react-native';
|
|
3
|
+
import type {Double} from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
|
+
import type {Camera} from './NativeComponentMapView';
|
|
5
|
+
import {Address} from 'react-native-maps';
|
|
6
|
+
|
|
7
|
+
type LatLng = {
|
|
8
|
+
latitude: Double;
|
|
9
|
+
longitude: Double;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
type Point = Readonly<{
|
|
13
|
+
x: Double; // Non-nullable Double for x
|
|
14
|
+
y: Double; // Non-nullable Double for y
|
|
15
|
+
}>;
|
|
16
|
+
|
|
17
|
+
export type Region = Readonly<
|
|
18
|
+
LatLng & {
|
|
19
|
+
latitudeDelta: Double; // Non-nullable Double for latitudeDelta
|
|
20
|
+
longitudeDelta: Double; // Non-nullable Double for longitudeDelta
|
|
21
|
+
}
|
|
22
|
+
>;
|
|
23
|
+
|
|
24
|
+
export type MapBoundaries = {northEast: LatLng; southWest: LatLng};
|
|
25
|
+
|
|
26
|
+
export interface Spec extends TurboModule {
|
|
27
|
+
getCamera(tag: Double): Promise<Camera>;
|
|
28
|
+
getMarkersFrames(tag: Double, onlyVisible: boolean): Promise<unknown>;
|
|
29
|
+
getMapBoundaries(tag: Double): Promise<MapBoundaries>;
|
|
30
|
+
takeSnapshot(tag: Double, config: string): Promise<string>;
|
|
31
|
+
getAddressFromCoordinates(tag: Double, coordinate: LatLng): Promise<Address>;
|
|
32
|
+
getPointForCoordinate(tag: Double, coordinate: LatLng): Promise<Point>;
|
|
33
|
+
getCoordinateForPoint(tag: Double, point: Point): Promise<LatLng>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default TurboModuleRegistry.getEnforcing<Spec>('RNMapsAirModule');
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type {HostComponent, ViewProps} from 'react-native';
|
|
2
|
+
|
|
3
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
4
|
+
import {
|
|
5
|
+
Double,
|
|
6
|
+
BubblingEventHandler,
|
|
7
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
8
|
+
|
|
9
|
+
export type LatLng = Readonly<{
|
|
10
|
+
latitude: Double; // Non-nullable Double for latitude
|
|
11
|
+
longitude: Double; // Non-nullable Double for longitude
|
|
12
|
+
}>;
|
|
13
|
+
|
|
14
|
+
export type CalloutPressEvent = BubblingEventHandler<
|
|
15
|
+
Readonly<{
|
|
16
|
+
action?: string;
|
|
17
|
+
id: string;
|
|
18
|
+
coordinate: {
|
|
19
|
+
latitude: Double; // Inlined LatLng
|
|
20
|
+
longitude: Double;
|
|
21
|
+
};
|
|
22
|
+
position?: {
|
|
23
|
+
x: Double; // Inlined Point
|
|
24
|
+
y: Double;
|
|
25
|
+
}; // Optional position for Android
|
|
26
|
+
}>
|
|
27
|
+
>;
|
|
28
|
+
|
|
29
|
+
export interface CalloutFabricNativeProps extends ViewProps {
|
|
30
|
+
/**
|
|
31
|
+
* If `true`, clicks on transparent areas in callout will be passed to map.
|
|
32
|
+
*
|
|
33
|
+
* @default false
|
|
34
|
+
* @platform iOS: Supported
|
|
35
|
+
* @platform Android: Not supported
|
|
36
|
+
*/
|
|
37
|
+
alphaHitTest?: boolean;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Callback that is called when the user presses on the callout
|
|
41
|
+
*
|
|
42
|
+
* @platform iOS: Apple Maps only
|
|
43
|
+
* @platform Android: Supported
|
|
44
|
+
*/
|
|
45
|
+
onPress?: CalloutPressEvent;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* If `false`, a default "tooltip" bubble window will be drawn around this callouts children.
|
|
49
|
+
* If `true`, the child views can fully customize their appearance, including any "bubble" like styles.
|
|
50
|
+
*
|
|
51
|
+
* @default false
|
|
52
|
+
* @platform iOS: Supported
|
|
53
|
+
* @platform Android: Supported
|
|
54
|
+
*/
|
|
55
|
+
tooltip?: boolean;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export default codegenNativeComponent<CalloutFabricNativeProps>(
|
|
59
|
+
'RNMapsCallout',
|
|
60
|
+
{
|
|
61
|
+
excludedPlatforms: ['iOS'],
|
|
62
|
+
},
|
|
63
|
+
) as HostComponent<CalloutFabricNativeProps>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type {HostComponent, ViewProps, ColorValue} from 'react-native';
|
|
2
|
+
|
|
3
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
4
|
+
import {
|
|
5
|
+
Double,
|
|
6
|
+
Float,
|
|
7
|
+
BubblingEventHandler,
|
|
8
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
9
|
+
|
|
10
|
+
export type LatLng = Readonly<{
|
|
11
|
+
latitude: Double; // Non-nullable Double for latitude
|
|
12
|
+
longitude: Double; // Non-nullable Double for longitude
|
|
13
|
+
}>;
|
|
14
|
+
|
|
15
|
+
export type CirclePressEventHandler = BubblingEventHandler<
|
|
16
|
+
Readonly<{
|
|
17
|
+
action?: string;
|
|
18
|
+
id: string;
|
|
19
|
+
coordinate: {
|
|
20
|
+
latitude: Double; // Inlined LatLng
|
|
21
|
+
longitude: Double;
|
|
22
|
+
};
|
|
23
|
+
position?: {
|
|
24
|
+
x: Double; // Inlined Point
|
|
25
|
+
y: Double;
|
|
26
|
+
}; // Optional position for Android
|
|
27
|
+
}>
|
|
28
|
+
>;
|
|
29
|
+
|
|
30
|
+
export interface CircleFabricNativeProps extends ViewProps {
|
|
31
|
+
/**
|
|
32
|
+
* The coordinates of the center of the circle.
|
|
33
|
+
*
|
|
34
|
+
* @platform iOS: Supported
|
|
35
|
+
* @platform Android: Supported
|
|
36
|
+
*/
|
|
37
|
+
center: LatLng;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The stroke color to use for the path.
|
|
41
|
+
*
|
|
42
|
+
* @default `#000`, `rgba(r,g,b,0.5)`
|
|
43
|
+
* @platform iOS: Supported
|
|
44
|
+
* @platform Android: Supported
|
|
45
|
+
*/
|
|
46
|
+
fillColor?: ColorValue;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The radius of the circle to be drawn (in meters)
|
|
50
|
+
*
|
|
51
|
+
* @platform iOS: Supported
|
|
52
|
+
* @platform Android: Supported
|
|
53
|
+
*/
|
|
54
|
+
radius: Double;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The stroke color to use for the path.
|
|
58
|
+
*
|
|
59
|
+
* @default `#000`, `rgba(r,g,b,0.5)`
|
|
60
|
+
* @platform iOS: Supported
|
|
61
|
+
* @platform Android: Supported
|
|
62
|
+
*/
|
|
63
|
+
strokeColor?: ColorValue;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Callback that is called when user taps on the map.
|
|
67
|
+
*
|
|
68
|
+
* @platform iOS: Supported
|
|
69
|
+
* @platform Android: Supported
|
|
70
|
+
*/
|
|
71
|
+
onPress?: CirclePressEventHandler;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The stroke width to use for the path.
|
|
75
|
+
*
|
|
76
|
+
* @default 1
|
|
77
|
+
* @platform iOS: Supported
|
|
78
|
+
* @platform Android: Supported
|
|
79
|
+
*/
|
|
80
|
+
strokeWidth?: Float;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Boolean to allow a polygon to be tappable and use the onPress function.
|
|
84
|
+
*
|
|
85
|
+
* @platform iOS: Google Maps only
|
|
86
|
+
* @platform Android: Supported
|
|
87
|
+
*/
|
|
88
|
+
tappable?: boolean;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export default codegenNativeComponent<CircleFabricNativeProps>(
|
|
92
|
+
'RNMapsCircle',
|
|
93
|
+
{},
|
|
94
|
+
) as HostComponent<CircleFabricNativeProps>;
|