react-native-maps 1.21.0-alpha.96 → 1.21.0-alpha.97
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/lib/{MapMarker.d.ts → src/MapMarker.d.ts} +1 -1
- package/lib/{MapMarker.js → src/MapMarker.js} +1 -1
- package/lib/{MapView.js → src/MapView.js} +2 -2
- package/lib/{createFabricMap.d.ts → src/createFabricMap.d.ts} +2 -2
- package/lib/{createFabricMap.js → src/createFabricMap.js} +1 -1
- package/lib/{decorateMapComponent.js → src/decorateMapComponent.js} +6 -6
- package/package.json +4 -4
- 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
- /package/lib/{AnimatedRegion.d.ts → src/AnimatedRegion.d.ts} +0 -0
- /package/lib/{AnimatedRegion.js → src/AnimatedRegion.js} +0 -0
- /package/lib/{Geojson.d.ts → src/Geojson.d.ts} +0 -0
- /package/lib/{Geojson.js → src/Geojson.js} +0 -0
- /package/lib/{MapCallout.d.ts → src/MapCallout.d.ts} +0 -0
- /package/lib/{MapCallout.js → src/MapCallout.js} +0 -0
- /package/lib/{MapCalloutSubview.d.ts → src/MapCalloutSubview.d.ts} +0 -0
- /package/lib/{MapCalloutSubview.js → src/MapCalloutSubview.js} +0 -0
- /package/lib/{MapCircle.d.ts → src/MapCircle.d.ts} +0 -0
- /package/lib/{MapCircle.js → src/MapCircle.js} +0 -0
- /package/lib/{MapHeatmap.d.ts → src/MapHeatmap.d.ts} +0 -0
- /package/lib/{MapHeatmap.js → src/MapHeatmap.js} +0 -0
- /package/lib/{MapLocalTile.d.ts → src/MapLocalTile.d.ts} +0 -0
- /package/lib/{MapLocalTile.js → src/MapLocalTile.js} +0 -0
- /package/lib/{MapMarkerNativeComponent.d.ts → src/MapMarkerNativeComponent.d.ts} +0 -0
- /package/lib/{MapMarkerNativeComponent.js → src/MapMarkerNativeComponent.js} +0 -0
- /package/lib/{MapOverlay.d.ts → src/MapOverlay.d.ts} +0 -0
- /package/lib/{MapOverlay.js → src/MapOverlay.js} +0 -0
- /package/lib/{MapPolygon.d.ts → src/MapPolygon.d.ts} +0 -0
- /package/lib/{MapPolygon.js → src/MapPolygon.js} +0 -0
- /package/lib/{MapPolygon.types.d.ts → src/MapPolygon.types.d.ts} +0 -0
- /package/lib/{MapPolygon.types.js → src/MapPolygon.types.js} +0 -0
- /package/lib/{MapPolyline.d.ts → src/MapPolyline.d.ts} +0 -0
- /package/lib/{MapPolyline.js → src/MapPolyline.js} +0 -0
- /package/lib/{MapUrlTile.d.ts → src/MapUrlTile.d.ts} +0 -0
- /package/lib/{MapUrlTile.js → src/MapUrlTile.js} +0 -0
- /package/lib/{MapView.d.ts → src/MapView.d.ts} +0 -0
- /package/lib/{MapView.types.d.ts → src/MapView.types.d.ts} +0 -0
- /package/lib/{MapView.types.js → src/MapView.types.js} +0 -0
- /package/lib/{MapView.web.d.ts → src/MapView.web.d.ts} +0 -0
- /package/lib/{MapView.web.js → src/MapView.web.js} +0 -0
- /package/lib/{MapViewNativeComponent.d.ts → src/MapViewNativeComponent.d.ts} +0 -0
- /package/lib/{MapViewNativeComponent.js → src/MapViewNativeComponent.js} +0 -0
- /package/lib/{MapWMSTile.d.ts → src/MapWMSTile.d.ts} +0 -0
- /package/lib/{MapWMSTile.js → src/MapWMSTile.js} +0 -0
- /package/lib/{ProviderConstants.d.ts → src/ProviderConstants.d.ts} +0 -0
- /package/lib/{ProviderConstants.js → src/ProviderConstants.js} +0 -0
- /package/lib/{decorateMapComponent.d.ts → src/decorateMapComponent.d.ts} +0 -0
- /package/lib/{fixImageProp.d.ts → src/fixImageProp.d.ts} +0 -0
- /package/lib/{fixImageProp.js → src/fixImageProp.js} +0 -0
- /package/lib/{index.d.ts → src/index.d.ts} +0 -0
- /package/lib/{index.js → src/index.js} +0 -0
- /package/lib/{sharedTypes.d.ts → src/sharedTypes.d.ts} +0 -0
- /package/lib/{sharedTypes.js → src/sharedTypes.js} +0 -0
- /package/lib/{sharedTypesInternal.d.ts → src/sharedTypesInternal.d.ts} +0 -0
- /package/lib/{sharedTypesInternal.js → src/sharedTypesInternal.js} +0 -0
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { Animated, ViewProps, ImageURISource, ImageRequireSource } from 'react-native';
|
|
3
3
|
import { MapManagerCommand, NativeComponent, ProviderContext, UIManagerCommand } from './decorateMapComponent';
|
|
4
4
|
import { MapMarkerNativeComponentType } from './MapMarkerNativeComponent';
|
|
5
|
-
import type { AppleMarkerPriority } from '
|
|
5
|
+
import type { AppleMarkerPriority } from '../specs/NativeComponentMarker';
|
|
6
6
|
import { CalloutPressEvent, LatLng, MarkerDeselectEvent, MarkerDragEvent, MarkerDragStartEndEvent, MarkerPressEvent, MarkerSelectEvent, Point } from './sharedTypes';
|
|
7
7
|
import { Modify } from './sharedTypesInternal';
|
|
8
8
|
type AppleMarkerVisibility = 'hidden' | 'adaptive' | 'visible';
|
|
@@ -28,7 +28,7 @@ const React = __importStar(require("react"));
|
|
|
28
28
|
const react_native_1 = require("react-native");
|
|
29
29
|
const decorateMapComponent_1 = __importStar(require("./decorateMapComponent"));
|
|
30
30
|
const MapMarkerNativeComponent_1 = require("./MapMarkerNativeComponent");
|
|
31
|
-
const NativeComponentMarker_1 = require("
|
|
31
|
+
const NativeComponentMarker_1 = require("../specs/NativeComponentMarker");
|
|
32
32
|
const ProviderConstants_1 = require("./ProviderConstants");
|
|
33
33
|
const fixImageProp_1 = require("./fixImageProp");
|
|
34
34
|
class MapMarker extends React.Component {
|
|
@@ -31,8 +31,8 @@ const React = __importStar(require("react"));
|
|
|
31
31
|
const react_native_1 = require("react-native");
|
|
32
32
|
const decorateMapComponent_1 = require("./decorateMapComponent");
|
|
33
33
|
const MapViewNativeComponent_1 = require("./MapViewNativeComponent");
|
|
34
|
-
const NativeComponentMapView_1 = __importStar(require("
|
|
35
|
-
const NativeComponentGoogleMapView_1 = __importStar(require("
|
|
34
|
+
const NativeComponentMapView_1 = __importStar(require("../specs/NativeComponentMapView"));
|
|
35
|
+
const NativeComponentGoogleMapView_1 = __importStar(require("../specs/NativeComponentGoogleMapView"));
|
|
36
36
|
const createFabricMap_1 = __importDefault(require("./createFabricMap"));
|
|
37
37
|
const FabricMap = (0, createFabricMap_1.default)(NativeComponentMapView_1.default, NativeComponentMapView_1.Commands);
|
|
38
38
|
var FabricGoogleMap = null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { LatLng, Point, Region } from './sharedTypes';
|
|
3
3
|
import type { Address, Camera, EdgePadding, SnapshotOptions } from './MapView.types';
|
|
4
|
-
import { MapBoundaries } from '
|
|
5
|
-
import { MapFabricNativeProps } from '
|
|
4
|
+
import { MapBoundaries } from '../specs/NativeAirMapsModule';
|
|
5
|
+
import { MapFabricNativeProps } from '../specs/NativeComponentMapView';
|
|
6
6
|
export type FabricMapViewProps = MapFabricNativeProps;
|
|
7
7
|
export interface FabricMapHandle {
|
|
8
8
|
getCamera: () => Promise<Camera>;
|
|
@@ -28,7 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const react_1 = __importStar(require("react"));
|
|
30
30
|
const react_native_1 = require("react-native");
|
|
31
|
-
const NativeAirMapsModule_1 = __importDefault(require("
|
|
31
|
+
const NativeAirMapsModule_1 = __importDefault(require("../specs/NativeAirMapsModule"));
|
|
32
32
|
const createFabricMap = (ViewComponent, Commands) => {
|
|
33
33
|
return (0, react_1.forwardRef)((props, ref) => {
|
|
34
34
|
const fabricRef = (0, react_1.useRef)(null);
|
|
@@ -7,12 +7,12 @@ exports.googleMapIsInstalled = exports.createNotSupportedComponent = exports.get
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const react_native_1 = require("react-native");
|
|
9
9
|
const ProviderConstants_1 = require("./ProviderConstants");
|
|
10
|
-
const NativeComponentGooglePolygon_1 = __importDefault(require("
|
|
11
|
-
const NativeComponentMarker_1 = __importDefault(require("
|
|
12
|
-
const NativeComponentCallout_1 = __importDefault(require("
|
|
13
|
-
const NativeComponentPolyline_1 = __importDefault(require("
|
|
14
|
-
const NativeComponentCircle_1 = __importDefault(require("
|
|
15
|
-
const NativeComponentOverlay_1 = __importDefault(require("
|
|
10
|
+
const NativeComponentGooglePolygon_1 = __importDefault(require("../specs/NativeComponentGooglePolygon"));
|
|
11
|
+
const NativeComponentMarker_1 = __importDefault(require("../specs/NativeComponentMarker"));
|
|
12
|
+
const NativeComponentCallout_1 = __importDefault(require("../specs/NativeComponentCallout"));
|
|
13
|
+
const NativeComponentPolyline_1 = __importDefault(require("../specs/NativeComponentPolyline"));
|
|
14
|
+
const NativeComponentCircle_1 = __importDefault(require("../specs/NativeComponentCircle"));
|
|
15
|
+
const NativeComponentOverlay_1 = __importDefault(require("../specs/NativeComponentOverlay"));
|
|
16
16
|
exports.SUPPORTED = 'SUPPORTED';
|
|
17
17
|
exports.USES_DEFAULT_IMPLEMENTATION = 'USES_DEFAULT_IMPLEMENTATION';
|
|
18
18
|
exports.NOT_SUPPORTED = 'NOT_SUPPORTED';
|
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.97",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|
|
@@ -17,11 +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"
|
|
21
|
-
"prepack": "node updateCodegenConfig.js"
|
|
20
|
+
"bootstrap": "yarn --cwd example && yarn && yarn bundle-install && yarn pod-install"
|
|
22
21
|
},
|
|
23
22
|
"files": [
|
|
24
23
|
"lib",
|
|
24
|
+
"specs",
|
|
25
25
|
"android",
|
|
26
26
|
"ios",
|
|
27
27
|
"react-native-maps.podspec",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"codegenConfig": {
|
|
95
95
|
"name": "RNMapsSpecs",
|
|
96
96
|
"type": "all",
|
|
97
|
-
"jsSrcsDir": "./
|
|
97
|
+
"jsSrcsDir": "./specs",
|
|
98
98
|
"android": {
|
|
99
99
|
"javaPackageName": "com.rnmaps.fabric"
|
|
100
100
|
}
|
|
@@ -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>;
|