react-native-maps 1.21.0-alpha.65 → 1.21.0-alpha.67
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/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 +8 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/Props.h +11 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI.h +6 -2
- 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/CalloutManager.java +89 -0
- package/android/src/main/java/com/rnmaps/fabric/MapViewManager.java +0 -3
- package/android/src/main/java/com/rnmaps/fabric/MarkerManager.java +16 -1
- package/android/src/main/java/com/rnmaps/fabric/NativeAirMapsModule.java +107 -18
- package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +5 -1
- package/android/src/main/java/com/rnmaps/maps/MapCallout.java +19 -0
- package/android/src/main/java/com/rnmaps/maps/MapModule.java +206 -206
- 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 +8 -0
- package/ios/generated/RNMapsSpecs/Props.h +11 -0
- package/ios/generated/RNMapsSpecs/RNMapsSpecs.h +3 -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/ios/generated/RNMapsSpecsJSI.h +6 -2
- package/lib/MapCallout.js +1 -0
- package/lib/MapView.js +3 -9
- package/lib/decorateMapComponent.js +5 -0
- package/lib/specs/NativeComponentCallout.d.ts +46 -0
- package/lib/specs/NativeComponentCallout.js +9 -0
- package/package.json +1 -1
package/lib/MapView.js
CHANGED
|
@@ -206,15 +206,9 @@ class MapView extends React.Component {
|
|
|
206
206
|
if (config.result !== 'file' && config.result !== 'base64') {
|
|
207
207
|
throw new Error('Invalid result specified');
|
|
208
208
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
return
|
|
212
|
-
}
|
|
213
|
-
else if (react_native_1.Platform.OS === 'ios') {
|
|
214
|
-
if (this.fabricMap.current) {
|
|
215
|
-
// @ts-ignore
|
|
216
|
-
return this.fabricMap.current.takeSnapshot(config);
|
|
217
|
-
}
|
|
209
|
+
if (this.fabricMap.current) {
|
|
210
|
+
// @ts-ignore
|
|
211
|
+
return this.fabricMap.current.takeSnapshot(config);
|
|
218
212
|
}
|
|
219
213
|
return Promise.reject('takeSnapshot not supported on this platform');
|
|
220
214
|
}
|
|
@@ -9,6 +9,7 @@ const react_native_1 = require("react-native");
|
|
|
9
9
|
const ProviderConstants_1 = require("./ProviderConstants");
|
|
10
10
|
const NativeComponentGooglePolygon_1 = __importDefault(require("./specs/NativeComponentGooglePolygon"));
|
|
11
11
|
const NativeComponentMarker_1 = __importDefault(require("./specs/NativeComponentMarker"));
|
|
12
|
+
const NativeComponentCallout_1 = __importDefault(require("./specs/NativeComponentCallout"));
|
|
12
13
|
exports.SUPPORTED = 'SUPPORTED';
|
|
13
14
|
exports.USES_DEFAULT_IMPLEMENTATION = 'USES_DEFAULT_IMPLEMENTATION';
|
|
14
15
|
exports.NOT_SUPPORTED = 'NOT_SUPPORTED';
|
|
@@ -44,6 +45,10 @@ function decorateMapComponent(Component, componentName, providers) {
|
|
|
44
45
|
// @ts-ignore
|
|
45
46
|
return NativeComponentMarker_1.default;
|
|
46
47
|
}
|
|
48
|
+
if (componentName === 'Callout' && react_native_1.Platform.OS === 'android') {
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
return NativeComponentCallout_1.default;
|
|
51
|
+
}
|
|
47
52
|
const key = provider || 'default';
|
|
48
53
|
if (components[key]) {
|
|
49
54
|
return components[key];
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import { Double, BubblingEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
export type LatLng = Readonly<{
|
|
4
|
+
latitude: Double;
|
|
5
|
+
longitude: Double;
|
|
6
|
+
}>;
|
|
7
|
+
export type CalloutPressEvent = 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 CalloutFabricNativeProps extends ViewProps {
|
|
20
|
+
/**
|
|
21
|
+
* If `true`, clicks on transparent areas in callout will be passed to map.
|
|
22
|
+
*
|
|
23
|
+
* @default false
|
|
24
|
+
* @platform iOS: Supported
|
|
25
|
+
* @platform Android: Not supported
|
|
26
|
+
*/
|
|
27
|
+
alphaHitTest?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Callback that is called when the user presses on the callout
|
|
30
|
+
*
|
|
31
|
+
* @platform iOS: Apple Maps only
|
|
32
|
+
* @platform Android: Supported
|
|
33
|
+
*/
|
|
34
|
+
onPress?: CalloutPressEvent;
|
|
35
|
+
/**
|
|
36
|
+
* If `false`, a default "tooltip" bubble window will be drawn around this callouts children.
|
|
37
|
+
* If `true`, the child views can fully customize their appearance, including any "bubble" like styles.
|
|
38
|
+
*
|
|
39
|
+
* @default false
|
|
40
|
+
* @platform iOS: Supported
|
|
41
|
+
* @platform Android: Supported
|
|
42
|
+
*/
|
|
43
|
+
tooltip?: boolean;
|
|
44
|
+
}
|
|
45
|
+
declare const _default: HostComponent<CalloutFabricNativeProps>;
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
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)('RNMapsCallout', {
|
|
8
|
+
excludedPlatforms: ['iOS'],
|
|
9
|
+
});
|
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.67",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|