@rnmapbox/maps 10.0.0-beta.65 → 10.0.0-beta.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/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/camera/RCTMGLCamera.kt +1 -1
- package/index.d.ts +36 -166
- package/ios/RCTMGL-v10/RCTMGLLogging.swift +13 -0
- package/ios/RCTMGL-v10/RCTMGLMarkerView.swift +86 -55
- package/ios/RCTMGL-v10/RCTMGLOfflineModule.swift +138 -55
- package/javascript/components/BackgroundLayer.tsx +91 -0
- package/javascript/components/CircleLayer.tsx +97 -0
- package/javascript/components/FillExtrusionLayer.tsx +95 -0
- package/javascript/components/FillLayer.tsx +91 -0
- package/javascript/components/HeatmapLayer.tsx +96 -0
- package/javascript/components/NativeUserLocation.tsx +33 -0
- package/javascript/components/RasterLayer.tsx +88 -0
- package/javascript/components/SkyLayer.tsx +70 -0
- package/javascript/modules/location/locationManager.js +3 -1
- package/lib/commonjs/components/BackgroundLayer.js +6 -55
- package/lib/commonjs/components/BackgroundLayer.js.map +1 -1
- package/lib/commonjs/components/CircleLayer.js +8 -58
- package/lib/commonjs/components/CircleLayer.js.map +1 -1
- package/lib/commonjs/components/FillExtrusionLayer.js +3 -55
- package/lib/commonjs/components/FillExtrusionLayer.js.map +1 -1
- package/lib/commonjs/components/FillLayer.js +2 -55
- package/lib/commonjs/components/FillLayer.js.map +1 -1
- package/lib/commonjs/components/HeatmapLayer.js +3 -56
- package/lib/commonjs/components/HeatmapLayer.js.map +1 -1
- package/lib/commonjs/components/NativeUserLocation.js +6 -31
- package/lib/commonjs/components/NativeUserLocation.js.map +1 -1
- package/lib/commonjs/components/RasterLayer.js +1 -53
- package/lib/commonjs/components/RasterLayer.js.map +1 -1
- package/lib/commonjs/components/SkyLayer.js +2 -43
- package/lib/commonjs/components/SkyLayer.js.map +1 -1
- package/lib/commonjs/modules/location/locationManager.js +3 -1
- package/lib/commonjs/modules/location/locationManager.js.map +1 -1
- package/lib/module/components/BackgroundLayer.js +6 -55
- package/lib/module/components/BackgroundLayer.js.map +1 -1
- package/lib/module/components/CircleLayer.js +7 -57
- package/lib/module/components/CircleLayer.js.map +1 -1
- package/lib/module/components/FillExtrusionLayer.js +2 -54
- package/lib/module/components/FillExtrusionLayer.js.map +1 -1
- package/lib/module/components/FillLayer.js +1 -54
- package/lib/module/components/FillLayer.js.map +1 -1
- package/lib/module/components/HeatmapLayer.js +2 -55
- package/lib/module/components/HeatmapLayer.js.map +1 -1
- package/lib/module/components/NativeUserLocation.js +4 -30
- package/lib/module/components/NativeUserLocation.js.map +1 -1
- package/lib/module/components/RasterLayer.js +1 -53
- package/lib/module/components/RasterLayer.js.map +1 -1
- package/lib/module/components/SkyLayer.js +1 -42
- package/lib/module/components/SkyLayer.js.map +1 -1
- package/lib/module/modules/location/locationManager.js +3 -1
- package/lib/module/modules/location/locationManager.js.map +1 -1
- package/lib/typescript/components/BackgroundLayer.d.ts +62 -0
- package/lib/typescript/components/BackgroundLayer.d.ts.map +1 -0
- package/lib/typescript/components/CircleLayer.d.ts +66 -0
- package/lib/typescript/components/CircleLayer.d.ts.map +1 -0
- package/lib/typescript/components/FillExtrusionLayer.d.ts +65 -0
- package/lib/typescript/components/FillExtrusionLayer.d.ts.map +1 -0
- package/{javascript/components/FillLayer.js → lib/typescript/components/FillLayer.d.ts} +28 -57
- package/lib/typescript/components/FillLayer.d.ts.map +1 -0
- package/lib/typescript/components/HeatmapLayer.d.ts +66 -0
- package/lib/typescript/components/HeatmapLayer.d.ts.map +1 -0
- package/lib/typescript/components/NativeUserLocation.d.ts +22 -0
- package/lib/typescript/components/NativeUserLocation.d.ts.map +1 -0
- package/lib/typescript/components/RasterLayer.d.ts +62 -0
- package/lib/typescript/components/RasterLayer.d.ts.map +1 -0
- package/lib/typescript/components/SkyLayer.d.ts +52 -0
- package/lib/typescript/components/SkyLayer.d.ts.map +1 -0
- package/package.json +1 -1
- package/javascript/components/BackgroundLayer.js +0 -97
- package/javascript/components/CircleLayer.js +0 -101
- package/javascript/components/FillExtrusionLayer.js +0 -98
- package/javascript/components/HeatmapLayer.js +0 -99
- package/javascript/components/NativeUserLocation.js +0 -41
- package/javascript/components/RasterLayer.js +0 -95
- package/javascript/components/SkyLayer.js +0 -80
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NativeModules, requireNativeComponent } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
FilterExpression,
|
|
6
|
+
HeatmapLayerStyleProps,
|
|
7
|
+
} from '../utils/MapboxStyles';
|
|
8
|
+
import { StyleValue } from '../utils/StyleValue';
|
|
9
|
+
|
|
10
|
+
import AbstractLayer from './AbstractLayer';
|
|
11
|
+
|
|
12
|
+
const MapboxGL = NativeModules.MGLModule;
|
|
13
|
+
|
|
14
|
+
export const NATIVE_MODULE_NAME = 'RCTMGLHeatmapLayer';
|
|
15
|
+
|
|
16
|
+
export type Props = {
|
|
17
|
+
/**
|
|
18
|
+
* A string that uniquely identifies the source in the style to which it is added.
|
|
19
|
+
*/
|
|
20
|
+
id: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The source from which to obtain the data to style.
|
|
24
|
+
* If the source has not yet been added to the current style, the behavior is undefined.
|
|
25
|
+
* Inferred from parent source only if the layer is a direct child to it.
|
|
26
|
+
*/
|
|
27
|
+
sourceID?: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Identifier of the layer within the source identified by the sourceID property
|
|
31
|
+
* from which the receiver obtains the data to style.
|
|
32
|
+
*/
|
|
33
|
+
sourceLayerID?: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Inserts a layer above aboveLayerID.
|
|
37
|
+
*/
|
|
38
|
+
aboveLayerID?: string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Inserts a layer below belowLayerID
|
|
42
|
+
*/
|
|
43
|
+
belowLayerID?: string;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Inserts a layer at a specified index
|
|
47
|
+
*/
|
|
48
|
+
layerIndex?: number;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Filter only the features in the source layer that satisfy a condition that you define
|
|
52
|
+
*/
|
|
53
|
+
filter?: FilterExpression;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The minimum zoom level at which the layer gets parsed and appears.
|
|
57
|
+
*/
|
|
58
|
+
minZoomLevel?: number;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The maximum zoom level at which the layer gets parsed and appears.
|
|
62
|
+
*/
|
|
63
|
+
maxZoomLevel?: number;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Customizable style attributes
|
|
67
|
+
*/
|
|
68
|
+
style?: HeatmapLayerStyleProps;
|
|
69
|
+
} & React.ComponentProps<typeof AbstractLayer>;
|
|
70
|
+
|
|
71
|
+
type NativeTypeProps = Omit<Props, 'style'> & {
|
|
72
|
+
reactStyle?: { [key: string]: StyleValue };
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* HeatmapLayer is a style layer that renders one or more filled circles on the map.
|
|
77
|
+
*/
|
|
78
|
+
class HeatmapLayer extends AbstractLayer<Props, NativeTypeProps> {
|
|
79
|
+
static defaultProps = {
|
|
80
|
+
sourceID: MapboxGL.StyleSource.DefaultSourceID,
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
render() {
|
|
84
|
+
const props = {
|
|
85
|
+
...this.props,
|
|
86
|
+
...this.baseProps,
|
|
87
|
+
sourceLayerID: this.props.sourceLayerID,
|
|
88
|
+
};
|
|
89
|
+
return <RCTMGLHeatmapLayer ref={this.setNativeLayer} {...props} />;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const RCTMGLHeatmapLayer =
|
|
94
|
+
requireNativeComponent<NativeTypeProps>(NATIVE_MODULE_NAME);
|
|
95
|
+
|
|
96
|
+
export default HeatmapLayer;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { memo } from 'react';
|
|
2
|
+
import { HostComponent, requireNativeComponent } from 'react-native';
|
|
3
|
+
|
|
4
|
+
const NATIVE_MODULE_NAME = 'RCTMGLNativeUserLocation';
|
|
5
|
+
|
|
6
|
+
export type Props = {
|
|
7
|
+
/**
|
|
8
|
+
* Android render mode.
|
|
9
|
+
*
|
|
10
|
+
* - normal: just a circle
|
|
11
|
+
* - compass: triangle with heading
|
|
12
|
+
* - gps: large arrow
|
|
13
|
+
*
|
|
14
|
+
* @platform android
|
|
15
|
+
*/
|
|
16
|
+
androidRenderMode?: 'normal' | 'compass' | 'gps';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* iOS only. A Boolean value indicating whether the user location annotation may display a permanent heading indicator.
|
|
20
|
+
*
|
|
21
|
+
* @platform ios
|
|
22
|
+
*/
|
|
23
|
+
iosShowsUserHeadingIndicator?: boolean;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const RCTMGLNativeUserLocation: HostComponent<Props> =
|
|
27
|
+
requireNativeComponent(NATIVE_MODULE_NAME);
|
|
28
|
+
|
|
29
|
+
const NativeUserLocation = memo((props: Props) => {
|
|
30
|
+
return <RCTMGLNativeUserLocation {...props} />;
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export default NativeUserLocation;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NativeModules, requireNativeComponent } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { FilterExpression, RasterLayerStyleProps } from '../utils/MapboxStyles';
|
|
5
|
+
import { StyleValue } from '../utils/StyleValue';
|
|
6
|
+
|
|
7
|
+
import AbstractLayer from './AbstractLayer';
|
|
8
|
+
|
|
9
|
+
const MapboxGL = NativeModules.MGLModule;
|
|
10
|
+
|
|
11
|
+
export const NATIVE_MODULE_NAME = 'RCTMGLRasterLayer';
|
|
12
|
+
|
|
13
|
+
export type Props = {
|
|
14
|
+
/**
|
|
15
|
+
* A string that uniquely identifies the source in the style to which it is added.
|
|
16
|
+
*/
|
|
17
|
+
id: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The source from which to obtain the data to style.
|
|
21
|
+
* If the source has not yet been added to the current style, the behavior is undefined.
|
|
22
|
+
* Inferred from parent source only if the layer is a direct child to it.
|
|
23
|
+
*/
|
|
24
|
+
sourceID?: string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style.
|
|
28
|
+
*/
|
|
29
|
+
sourceLayerID?: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Inserts a layer above aboveLayerID.
|
|
33
|
+
*/
|
|
34
|
+
aboveLayerID?: string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Inserts a layer below belowLayerID
|
|
38
|
+
*/
|
|
39
|
+
belowLayerID?: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Inserts a layer at a specified index
|
|
43
|
+
*/
|
|
44
|
+
layerIndex?: number;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Filter only the features in the source layer that satisfy a condition that you define
|
|
48
|
+
*/
|
|
49
|
+
filter?: FilterExpression;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The minimum zoom level at which the layer gets parsed and appears.
|
|
53
|
+
*/
|
|
54
|
+
minZoomLevel?: number;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The maximum zoom level at which the layer gets parsed and appears.
|
|
58
|
+
*/
|
|
59
|
+
maxZoomLevel?: number;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Customizable style attributes
|
|
63
|
+
*/
|
|
64
|
+
style: RasterLayerStyleProps;
|
|
65
|
+
} & React.ComponentProps<typeof AbstractLayer>;
|
|
66
|
+
|
|
67
|
+
type NativeTypeProps = Omit<Props, 'style'> & {
|
|
68
|
+
reactStyle?: { [key: string]: StyleValue };
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
class RasterLayer extends AbstractLayer<Props, NativeTypeProps> {
|
|
72
|
+
static defaultProps = {
|
|
73
|
+
sourceID: MapboxGL.StyleSource.DefaultSourceID,
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
render() {
|
|
77
|
+
const props = {
|
|
78
|
+
...this.baseProps,
|
|
79
|
+
sourceLayerID: this.props.sourceLayerID,
|
|
80
|
+
};
|
|
81
|
+
return <RCTMGLRasterLayer ref={this.setNativeLayer} {...props} />;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const RCTMGLRasterLayer =
|
|
86
|
+
requireNativeComponent<NativeTypeProps>(NATIVE_MODULE_NAME);
|
|
87
|
+
|
|
88
|
+
export default RasterLayer;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NativeModules, requireNativeComponent } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { FilterExpression, SkyLayerStyleProps } from '../utils/MapboxStyles';
|
|
5
|
+
import { StyleValue } from '../utils/StyleValue';
|
|
6
|
+
|
|
7
|
+
import AbstractLayer from './AbstractLayer';
|
|
8
|
+
|
|
9
|
+
const MapboxGL = NativeModules.MGLModule;
|
|
10
|
+
|
|
11
|
+
export const NATIVE_MODULE_NAME = 'RCTMGLSkyLayer';
|
|
12
|
+
|
|
13
|
+
export type Props = {
|
|
14
|
+
/**
|
|
15
|
+
* A string that uniquely identifies the source in the style to which it is added.
|
|
16
|
+
*/
|
|
17
|
+
id: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The source from which to obtain the data to style.
|
|
21
|
+
* If the source has not yet been added to the current style, the behavior is undefined.
|
|
22
|
+
*/
|
|
23
|
+
sourceID?: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Inserts a layer above aboveLayerID.
|
|
27
|
+
*/
|
|
28
|
+
aboveLayerID?: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Inserts a layer below belowLayerID
|
|
32
|
+
*/
|
|
33
|
+
belowLayerID?: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Inserts a layer at a specified index
|
|
37
|
+
*/
|
|
38
|
+
layerIndex?: number;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Filter only the features in the source layer that satisfy a condition that you define
|
|
42
|
+
*/
|
|
43
|
+
filter?: FilterExpression;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Customizable style attributes
|
|
47
|
+
*/
|
|
48
|
+
style?: SkyLayerStyleProps;
|
|
49
|
+
} & React.ComponentProps<typeof AbstractLayer>;
|
|
50
|
+
|
|
51
|
+
type NativeTypeProps = Omit<Props, 'style'> & {
|
|
52
|
+
reactStyle?: { [key: string]: StyleValue };
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* SkyLayer is a spherical dome around the map that is always rendered behind all other layers
|
|
56
|
+
*/
|
|
57
|
+
class SkyLayer extends AbstractLayer<Props, NativeTypeProps> {
|
|
58
|
+
static defaultProps = {
|
|
59
|
+
sourceID: MapboxGL.StyleSource.DefaultSourceID,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
render() {
|
|
63
|
+
return <RCTMGLSkyLayer ref={this.setNativeLayer} {...this.baseProps} />;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const RCTMGLSkyLayer =
|
|
68
|
+
requireNativeComponent<NativeTypeProps>(NATIVE_MODULE_NAME);
|
|
69
|
+
|
|
70
|
+
export default SkyLayer;
|
|
@@ -5,10 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.NATIVE_MODULE_NAME = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
8
|
var _reactNative = require("react-native");
|
|
10
|
-
var _utils = require("../utils");
|
|
11
|
-
var _styleMap = require("../utils/styleMap");
|
|
12
9
|
var _AbstractLayer = _interopRequireDefault(require("./AbstractLayer"));
|
|
13
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
11
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
@@ -20,65 +17,19 @@ const NATIVE_MODULE_NAME = 'RCTMGLBackgroundLayer';
|
|
|
20
17
|
exports.NATIVE_MODULE_NAME = NATIVE_MODULE_NAME;
|
|
21
18
|
class BackgroundLayer extends _AbstractLayer.default {
|
|
22
19
|
render() {
|
|
20
|
+
const props = {
|
|
21
|
+
...this.baseProps,
|
|
22
|
+
sourceLayerID: this.props.sourceLayerID
|
|
23
|
+
};
|
|
23
24
|
return /*#__PURE__*/_react.default.createElement(RCTMGLBackgroundLayer, _extends({
|
|
24
|
-
testID: "rctmglBackgroundLayer",
|
|
25
25
|
ref: this.setNativeLayer
|
|
26
|
-
},
|
|
26
|
+
}, props));
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
_defineProperty(BackgroundLayer, "propTypes", {
|
|
30
|
-
..._utils.viewPropTypes,
|
|
31
|
-
/**
|
|
32
|
-
* A string that uniquely identifies the source in the style to which it is added.
|
|
33
|
-
*/
|
|
34
|
-
id: _propTypes.default.string.isRequired,
|
|
35
|
-
/**
|
|
36
|
-
* The source from which to obtain the data to style.
|
|
37
|
-
* If the source has not yet been added to the current style, the behavior is undefined.
|
|
38
|
-
* Inferred from parent source only if the layer is a direct child to it.
|
|
39
|
-
*/
|
|
40
|
-
sourceID: _propTypes.default.string,
|
|
41
|
-
/**
|
|
42
|
-
* Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style.
|
|
43
|
-
*/
|
|
44
|
-
sourceLayerID: _propTypes.default.string,
|
|
45
|
-
/**
|
|
46
|
-
* Inserts a layer above aboveLayerID.
|
|
47
|
-
*/
|
|
48
|
-
aboveLayerID: _propTypes.default.string,
|
|
49
|
-
/**
|
|
50
|
-
* Inserts a layer below belowLayerID
|
|
51
|
-
*/
|
|
52
|
-
belowLayerID: _propTypes.default.string,
|
|
53
|
-
/**
|
|
54
|
-
* Inserts a layer at a specified index
|
|
55
|
-
*/
|
|
56
|
-
layerIndex: _propTypes.default.number,
|
|
57
|
-
/**
|
|
58
|
-
* Filter only the features in the source layer that satisfy a condition that you define
|
|
59
|
-
*/
|
|
60
|
-
filter: _propTypes.default.array,
|
|
61
|
-
/**
|
|
62
|
-
* The minimum zoom level at which the layer gets parsed and appears.
|
|
63
|
-
*/
|
|
64
|
-
minZoomLevel: _propTypes.default.number,
|
|
65
|
-
/**
|
|
66
|
-
* The maximum zoom level at which the layer gets parsed and appears.
|
|
67
|
-
*/
|
|
68
|
-
maxZoomLevel: _propTypes.default.number,
|
|
69
|
-
/**
|
|
70
|
-
* Customizable style attributes
|
|
71
|
-
*/
|
|
72
|
-
style: _propTypes.default.oneOfType([_styleMap.BackgroundLayerStyleProp, _propTypes.default.arrayOf(_styleMap.BackgroundLayerStyleProp)])
|
|
73
|
-
});
|
|
74
29
|
_defineProperty(BackgroundLayer, "defaultProps", {
|
|
75
30
|
sourceID: MapboxGL.StyleSource.DefaultSourceID
|
|
76
31
|
});
|
|
77
|
-
const RCTMGLBackgroundLayer = (0, _reactNative.requireNativeComponent)(NATIVE_MODULE_NAME
|
|
78
|
-
nativeOnly: {
|
|
79
|
-
reactStyle: true
|
|
80
|
-
}
|
|
81
|
-
});
|
|
32
|
+
const RCTMGLBackgroundLayer = (0, _reactNative.requireNativeComponent)(NATIVE_MODULE_NAME);
|
|
82
33
|
var _default = BackgroundLayer;
|
|
83
34
|
exports.default = _default;
|
|
84
35
|
//# sourceMappingURL=BackgroundLayer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MapboxGL","NativeModules","MGLModule","NATIVE_MODULE_NAME","BackgroundLayer","AbstractLayer","render","
|
|
1
|
+
{"version":3,"names":["MapboxGL","NativeModules","MGLModule","NATIVE_MODULE_NAME","BackgroundLayer","AbstractLayer","render","props","baseProps","sourceLayerID","setNativeLayer","sourceID","StyleSource","DefaultSourceID","RCTMGLBackgroundLayer","requireNativeComponent"],"sourceRoot":"../../javascript","sources":["BackgroundLayer.tsx"],"mappings":";;;;;;AAAA;AACA;AAQA;AAA4C;AAAA;AAAA;AAAA;AAAA;AAE5C,MAAMA,QAAQ,GAAGC,0BAAa,CAACC,SAAS;AAwDjC,MAAMC,kBAAkB,GAAG,uBAAuB;AAAC;AAM1D,MAAMC,eAAe,SAASC,sBAAa,CAAyB;EAKlEC,MAAM,GAAG;IACP,MAAMC,KAAK,GAAG;MACZ,GAAG,IAAI,CAACC,SAAS;MACjBC,aAAa,EAAE,IAAI,CAACF,KAAK,CAACE;IAC5B,CAAC;IACD,oBAAO,6BAAC,qBAAqB;MAAC,GAAG,EAAE,IAAI,CAACC;IAAe,GAAKH,KAAK,EAAI;EACvE;AACF;AAAC,gBAZKH,eAAe,kBACG;EACpBO,QAAQ,EAAEX,QAAQ,CAACY,WAAW,CAACC;AACjC,CAAC;AAWH,MAAMC,qBAAqB,GACzB,IAAAC,mCAAsB,EAAkBZ,kBAAkB,CAAC;AAAC,eAE/CC,eAAe;AAAA"}
|
|
@@ -5,10 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.NATIVE_MODULE_NAME = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
8
|
var _reactNative = require("react-native");
|
|
10
|
-
var _utils = require("../utils");
|
|
11
|
-
var _styleMap = require("../utils/styleMap");
|
|
12
9
|
var _AbstractLayer = _interopRequireDefault(require("./AbstractLayer"));
|
|
13
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
11
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
@@ -17,73 +14,26 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
|
|
|
17
14
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
18
15
|
const MapboxGL = _reactNative.NativeModules.MGLModule;
|
|
19
16
|
const NATIVE_MODULE_NAME = 'RCTMGLCircleLayer';
|
|
20
|
-
|
|
17
|
+
exports.NATIVE_MODULE_NAME = NATIVE_MODULE_NAME;
|
|
21
18
|
/**
|
|
22
19
|
* CircleLayer is a style layer that renders one or more filled circles on the map.
|
|
23
20
|
*/
|
|
24
|
-
exports.NATIVE_MODULE_NAME = NATIVE_MODULE_NAME;
|
|
25
21
|
class CircleLayer extends _AbstractLayer.default {
|
|
26
22
|
render() {
|
|
23
|
+
const props = {
|
|
24
|
+
...this.props,
|
|
25
|
+
...this.baseProps,
|
|
26
|
+
sourceLayerID: this.props.sourceLayerID
|
|
27
|
+
};
|
|
27
28
|
return /*#__PURE__*/_react.default.createElement(RCTMGLCircleLayer, _extends({
|
|
28
|
-
testID: "rctmglCircleLayer",
|
|
29
29
|
ref: this.setNativeLayer
|
|
30
|
-
},
|
|
30
|
+
}, props));
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
_defineProperty(CircleLayer, "propTypes", {
|
|
34
|
-
..._utils.viewPropTypes,
|
|
35
|
-
/**
|
|
36
|
-
* A string that uniquely identifies the source in the style to which it is added.
|
|
37
|
-
*/
|
|
38
|
-
id: _propTypes.default.string.isRequired,
|
|
39
|
-
/**
|
|
40
|
-
* The source from which to obtain the data to style.
|
|
41
|
-
* If the source has not yet been added to the current style, the behavior is undefined.
|
|
42
|
-
* Inferred from parent source only if the layer is a direct child to it.
|
|
43
|
-
*/
|
|
44
|
-
sourceID: _propTypes.default.string,
|
|
45
|
-
/**
|
|
46
|
-
* Identifier of the layer within the source identified by the sourceID property
|
|
47
|
-
* from which the receiver obtains the data to style.
|
|
48
|
-
*/
|
|
49
|
-
sourceLayerID: _propTypes.default.string,
|
|
50
|
-
/**
|
|
51
|
-
* Inserts a layer above aboveLayerID.
|
|
52
|
-
*/
|
|
53
|
-
aboveLayerID: _propTypes.default.string,
|
|
54
|
-
/**
|
|
55
|
-
* Inserts a layer below belowLayerID
|
|
56
|
-
*/
|
|
57
|
-
belowLayerID: _propTypes.default.string,
|
|
58
|
-
/**
|
|
59
|
-
* Inserts a layer at a specified index
|
|
60
|
-
*/
|
|
61
|
-
layerIndex: _propTypes.default.number,
|
|
62
|
-
/**
|
|
63
|
-
* Filter only the features in the source layer that satisfy a condition that you define
|
|
64
|
-
*/
|
|
65
|
-
filter: _propTypes.default.array,
|
|
66
|
-
/**
|
|
67
|
-
* The minimum zoom level at which the layer gets parsed and appears.
|
|
68
|
-
*/
|
|
69
|
-
minZoomLevel: _propTypes.default.number,
|
|
70
|
-
/**
|
|
71
|
-
* The maximum zoom level at which the layer gets parsed and appears.
|
|
72
|
-
*/
|
|
73
|
-
maxZoomLevel: _propTypes.default.number,
|
|
74
|
-
/**
|
|
75
|
-
* Customizable style attributes
|
|
76
|
-
*/
|
|
77
|
-
style: _propTypes.default.oneOfType([_styleMap.CircleLayerStyleProp, _propTypes.default.arrayOf(_styleMap.CircleLayerStyleProp)])
|
|
78
|
-
});
|
|
79
33
|
_defineProperty(CircleLayer, "defaultProps", {
|
|
80
34
|
sourceID: MapboxGL.StyleSource.DefaultSourceID
|
|
81
35
|
});
|
|
82
|
-
const RCTMGLCircleLayer = (0, _reactNative.requireNativeComponent)(NATIVE_MODULE_NAME
|
|
83
|
-
nativeOnly: {
|
|
84
|
-
reactStyle: true
|
|
85
|
-
}
|
|
86
|
-
});
|
|
36
|
+
const RCTMGLCircleLayer = (0, _reactNative.requireNativeComponent)(NATIVE_MODULE_NAME);
|
|
87
37
|
var _default = CircleLayer;
|
|
88
38
|
exports.default = _default;
|
|
89
39
|
//# sourceMappingURL=CircleLayer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MapboxGL","NativeModules","MGLModule","NATIVE_MODULE_NAME","CircleLayer","AbstractLayer","render","
|
|
1
|
+
{"version":3,"names":["MapboxGL","NativeModules","MGLModule","NATIVE_MODULE_NAME","CircleLayer","AbstractLayer","render","props","baseProps","sourceLayerID","setNativeLayer","sourceID","StyleSource","DefaultSourceID","RCTMGLCircleLayer","requireNativeComponent"],"sourceRoot":"../../javascript","sources":["CircleLayer.tsx"],"mappings":";;;;;;AAAA;AACA;AASA;AAA4C;AAAA;AAAA;AAAA;AAAA;AAE5C,MAAMA,QAAQ,GAAGC,0BAAa,CAACC,SAAS;AAyDjC,MAAMC,kBAAkB,GAAG,mBAAmB;AAAC;AAMtD;AACA;AACA;AACA,MAAMC,WAAW,SAASC,sBAAa,CAAyB;EAK9DC,MAAM,GAAG;IACP,MAAMC,KAAK,GAAG;MACZ,GAAG,IAAI,CAACA,KAAK;MACb,GAAG,IAAI,CAACC,SAAS;MACjBC,aAAa,EAAE,IAAI,CAACF,KAAK,CAACE;IAC5B,CAAC;IACD,oBAAO,6BAAC,iBAAiB;MAAC,GAAG,EAAE,IAAI,CAACC;IAAe,GAAKH,KAAK,EAAI;EACnE;AACF;AAAC,gBAbKH,WAAW,kBACO;EACpBO,QAAQ,EAAEX,QAAQ,CAACY,WAAW,CAACC;AACjC,CAAC;AAYH,MAAMC,iBAAuC,GAC3C,IAAAC,mCAAsB,EAAkBZ,kBAAkB,CAAC;AAAC,eAE/CC,WAAW;AAAA"}
|
|
@@ -5,10 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.NATIVE_MODULE_NAME = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
8
|
var _reactNative = require("react-native");
|
|
10
|
-
var _utils = require("../utils");
|
|
11
|
-
var _styleMap = require("../utils/styleMap");
|
|
12
9
|
var _AbstractLayer = _interopRequireDefault(require("./AbstractLayer"));
|
|
13
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
11
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
@@ -17,14 +14,14 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
|
|
|
17
14
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
18
15
|
const MapboxGL = _reactNative.NativeModules.MGLModule;
|
|
19
16
|
const NATIVE_MODULE_NAME = 'RCTMGLFillExtrusionLayer';
|
|
20
|
-
|
|
17
|
+
exports.NATIVE_MODULE_NAME = NATIVE_MODULE_NAME;
|
|
21
18
|
/**
|
|
22
19
|
* FillExtrusionLayer is a style layer that renders one or more 3D extruded polygons on the map.
|
|
23
20
|
*/
|
|
24
|
-
exports.NATIVE_MODULE_NAME = NATIVE_MODULE_NAME;
|
|
25
21
|
class FillExtrusionLayer extends _AbstractLayer.default {
|
|
26
22
|
render() {
|
|
27
23
|
const props = {
|
|
24
|
+
...this.props,
|
|
28
25
|
...this.baseProps,
|
|
29
26
|
sourceLayerID: this.props.sourceLayerID
|
|
30
27
|
};
|
|
@@ -33,59 +30,10 @@ class FillExtrusionLayer extends _AbstractLayer.default {
|
|
|
33
30
|
}, props));
|
|
34
31
|
}
|
|
35
32
|
}
|
|
36
|
-
_defineProperty(FillExtrusionLayer, "propTypes", {
|
|
37
|
-
..._utils.viewPropTypes,
|
|
38
|
-
/**
|
|
39
|
-
* A string that uniquely identifies the source in the style to which it is added.
|
|
40
|
-
*/
|
|
41
|
-
id: _propTypes.default.string.isRequired,
|
|
42
|
-
/**
|
|
43
|
-
* The source from which to obtain the data to style.
|
|
44
|
-
* If the source has not yet been added to the current style, the behavior is undefined.
|
|
45
|
-
* Inferred from parent source only if the layer is a direct child to it.
|
|
46
|
-
*/
|
|
47
|
-
sourceID: _propTypes.default.string,
|
|
48
|
-
/**
|
|
49
|
-
* Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style.
|
|
50
|
-
*/
|
|
51
|
-
sourceLayerID: _propTypes.default.string,
|
|
52
|
-
/**
|
|
53
|
-
* Inserts a layer above aboveLayerID.
|
|
54
|
-
*/
|
|
55
|
-
aboveLayerID: _propTypes.default.string,
|
|
56
|
-
/**
|
|
57
|
-
* Inserts a layer below belowLayerID
|
|
58
|
-
*/
|
|
59
|
-
belowLayerID: _propTypes.default.string,
|
|
60
|
-
/**
|
|
61
|
-
* Inserts a layer at a specified index
|
|
62
|
-
*/
|
|
63
|
-
layerIndex: _propTypes.default.number,
|
|
64
|
-
/**
|
|
65
|
-
* Filter only the features in the source layer that satisfy a condition that you define
|
|
66
|
-
*/
|
|
67
|
-
filter: _propTypes.default.array,
|
|
68
|
-
/**
|
|
69
|
-
* The minimum zoom level at which the layer gets parsed and appears.
|
|
70
|
-
*/
|
|
71
|
-
minZoomLevel: _propTypes.default.number,
|
|
72
|
-
/**
|
|
73
|
-
* The maximum zoom level at which the layer gets parsed and appears.
|
|
74
|
-
*/
|
|
75
|
-
maxZoomLevel: _propTypes.default.number,
|
|
76
|
-
/**
|
|
77
|
-
* Customizable style attributes
|
|
78
|
-
*/
|
|
79
|
-
style: _propTypes.default.oneOfType([_styleMap.FillExtrusionLayerStyleProp, _propTypes.default.arrayOf(_styleMap.FillExtrusionLayerStyleProp)])
|
|
80
|
-
});
|
|
81
33
|
_defineProperty(FillExtrusionLayer, "defaultProps", {
|
|
82
34
|
sourceID: MapboxGL.StyleSource.DefaultSourceID
|
|
83
35
|
});
|
|
84
|
-
const RCTMGLFillExtrusionLayer = (0, _reactNative.requireNativeComponent)(NATIVE_MODULE_NAME
|
|
85
|
-
nativeOnly: {
|
|
86
|
-
reactStyle: true
|
|
87
|
-
}
|
|
88
|
-
});
|
|
36
|
+
const RCTMGLFillExtrusionLayer = (0, _reactNative.requireNativeComponent)(NATIVE_MODULE_NAME);
|
|
89
37
|
var _default = FillExtrusionLayer;
|
|
90
38
|
exports.default = _default;
|
|
91
39
|
//# sourceMappingURL=FillExtrusionLayer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MapboxGL","NativeModules","MGLModule","NATIVE_MODULE_NAME","FillExtrusionLayer","AbstractLayer","render","props","baseProps","sourceLayerID","setNativeLayer","
|
|
1
|
+
{"version":3,"names":["MapboxGL","NativeModules","MGLModule","NATIVE_MODULE_NAME","FillExtrusionLayer","AbstractLayer","render","props","baseProps","sourceLayerID","setNativeLayer","sourceID","StyleSource","DefaultSourceID","RCTMGLFillExtrusionLayer","requireNativeComponent"],"sourceRoot":"../../javascript","sources":["FillExtrusionLayer.tsx"],"mappings":";;;;;;AAAA;AACA;AAQA;AAA4C;AAAA;AAAA;AAAA;AAAA;AAE5C,MAAMA,QAAQ,GAAGC,0BAAa,CAACC,SAAS;AAEjC,MAAMC,kBAAkB,GAAG,0BAA0B;AAAC;AA4D7D;AACA;AACA;AACA,MAAMC,kBAAkB,SAASC,sBAAa,CAAyB;EAKrEC,MAAM,GAAG;IACP,MAAMC,KAAK,GAAG;MACZ,GAAG,IAAI,CAACA,KAAK;MACb,GAAG,IAAI,CAACC,SAAS;MACjBC,aAAa,EAAE,IAAI,CAACF,KAAK,CAACE;IAC5B,CAAC;IACD,oBAAO,6BAAC,wBAAwB;MAAC,GAAG,EAAE,IAAI,CAACC;IAAe,GAAKH,KAAK,EAAI;EAC1E;AACF;AAAC,gBAbKH,kBAAkB,kBACA;EACpBO,QAAQ,EAAEX,QAAQ,CAACY,WAAW,CAACC;AACjC,CAAC;AAYH,MAAMC,wBAAwB,GAC5B,IAAAC,mCAAsB,EAAkBZ,kBAAkB,CAAC;AAAC,eAE/CC,kBAAkB;AAAA"}
|