@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.
Files changed (74) hide show
  1. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/camera/RCTMGLCamera.kt +1 -1
  2. package/index.d.ts +36 -166
  3. package/ios/RCTMGL-v10/RCTMGLLogging.swift +13 -0
  4. package/ios/RCTMGL-v10/RCTMGLMarkerView.swift +86 -55
  5. package/ios/RCTMGL-v10/RCTMGLOfflineModule.swift +138 -55
  6. package/javascript/components/BackgroundLayer.tsx +91 -0
  7. package/javascript/components/CircleLayer.tsx +97 -0
  8. package/javascript/components/FillExtrusionLayer.tsx +95 -0
  9. package/javascript/components/FillLayer.tsx +91 -0
  10. package/javascript/components/HeatmapLayer.tsx +96 -0
  11. package/javascript/components/NativeUserLocation.tsx +33 -0
  12. package/javascript/components/RasterLayer.tsx +88 -0
  13. package/javascript/components/SkyLayer.tsx +70 -0
  14. package/javascript/modules/location/locationManager.js +3 -1
  15. package/lib/commonjs/components/BackgroundLayer.js +6 -55
  16. package/lib/commonjs/components/BackgroundLayer.js.map +1 -1
  17. package/lib/commonjs/components/CircleLayer.js +8 -58
  18. package/lib/commonjs/components/CircleLayer.js.map +1 -1
  19. package/lib/commonjs/components/FillExtrusionLayer.js +3 -55
  20. package/lib/commonjs/components/FillExtrusionLayer.js.map +1 -1
  21. package/lib/commonjs/components/FillLayer.js +2 -55
  22. package/lib/commonjs/components/FillLayer.js.map +1 -1
  23. package/lib/commonjs/components/HeatmapLayer.js +3 -56
  24. package/lib/commonjs/components/HeatmapLayer.js.map +1 -1
  25. package/lib/commonjs/components/NativeUserLocation.js +6 -31
  26. package/lib/commonjs/components/NativeUserLocation.js.map +1 -1
  27. package/lib/commonjs/components/RasterLayer.js +1 -53
  28. package/lib/commonjs/components/RasterLayer.js.map +1 -1
  29. package/lib/commonjs/components/SkyLayer.js +2 -43
  30. package/lib/commonjs/components/SkyLayer.js.map +1 -1
  31. package/lib/commonjs/modules/location/locationManager.js +3 -1
  32. package/lib/commonjs/modules/location/locationManager.js.map +1 -1
  33. package/lib/module/components/BackgroundLayer.js +6 -55
  34. package/lib/module/components/BackgroundLayer.js.map +1 -1
  35. package/lib/module/components/CircleLayer.js +7 -57
  36. package/lib/module/components/CircleLayer.js.map +1 -1
  37. package/lib/module/components/FillExtrusionLayer.js +2 -54
  38. package/lib/module/components/FillExtrusionLayer.js.map +1 -1
  39. package/lib/module/components/FillLayer.js +1 -54
  40. package/lib/module/components/FillLayer.js.map +1 -1
  41. package/lib/module/components/HeatmapLayer.js +2 -55
  42. package/lib/module/components/HeatmapLayer.js.map +1 -1
  43. package/lib/module/components/NativeUserLocation.js +4 -30
  44. package/lib/module/components/NativeUserLocation.js.map +1 -1
  45. package/lib/module/components/RasterLayer.js +1 -53
  46. package/lib/module/components/RasterLayer.js.map +1 -1
  47. package/lib/module/components/SkyLayer.js +1 -42
  48. package/lib/module/components/SkyLayer.js.map +1 -1
  49. package/lib/module/modules/location/locationManager.js +3 -1
  50. package/lib/module/modules/location/locationManager.js.map +1 -1
  51. package/lib/typescript/components/BackgroundLayer.d.ts +62 -0
  52. package/lib/typescript/components/BackgroundLayer.d.ts.map +1 -0
  53. package/lib/typescript/components/CircleLayer.d.ts +66 -0
  54. package/lib/typescript/components/CircleLayer.d.ts.map +1 -0
  55. package/lib/typescript/components/FillExtrusionLayer.d.ts +65 -0
  56. package/lib/typescript/components/FillExtrusionLayer.d.ts.map +1 -0
  57. package/{javascript/components/FillLayer.js → lib/typescript/components/FillLayer.d.ts} +28 -57
  58. package/lib/typescript/components/FillLayer.d.ts.map +1 -0
  59. package/lib/typescript/components/HeatmapLayer.d.ts +66 -0
  60. package/lib/typescript/components/HeatmapLayer.d.ts.map +1 -0
  61. package/lib/typescript/components/NativeUserLocation.d.ts +22 -0
  62. package/lib/typescript/components/NativeUserLocation.d.ts.map +1 -0
  63. package/lib/typescript/components/RasterLayer.d.ts +62 -0
  64. package/lib/typescript/components/RasterLayer.d.ts.map +1 -0
  65. package/lib/typescript/components/SkyLayer.d.ts +52 -0
  66. package/lib/typescript/components/SkyLayer.d.ts.map +1 -0
  67. package/package.json +1 -1
  68. package/javascript/components/BackgroundLayer.js +0 -97
  69. package/javascript/components/CircleLayer.js +0 -101
  70. package/javascript/components/FillExtrusionLayer.js +0 -98
  71. package/javascript/components/HeatmapLayer.js +0 -99
  72. package/javascript/components/NativeUserLocation.js +0 -41
  73. package/javascript/components/RasterLayer.js +0 -95
  74. package/javascript/components/SkyLayer.js +0 -80
@@ -1,98 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { NativeModules, requireNativeComponent } from 'react-native';
4
-
5
- import { viewPropTypes } from '../utils';
6
- import { FillExtrusionLayerStyleProp } from '../utils/styleMap';
7
-
8
- import AbstractLayer from './AbstractLayer';
9
-
10
- const MapboxGL = NativeModules.MGLModule;
11
-
12
- export const NATIVE_MODULE_NAME = 'RCTMGLFillExtrusionLayer';
13
-
14
- /**
15
- * FillExtrusionLayer is a style layer that renders one or more 3D extruded polygons on the map.
16
- */
17
- class FillExtrusionLayer extends AbstractLayer {
18
- static propTypes = {
19
- ...viewPropTypes,
20
-
21
- /**
22
- * A string that uniquely identifies the source in the style to which it is added.
23
- */
24
- id: PropTypes.string.isRequired,
25
-
26
- /**
27
- * The source from which to obtain the data to style.
28
- * If the source has not yet been added to the current style, the behavior is undefined.
29
- * Inferred from parent source only if the layer is a direct child to it.
30
- */
31
- sourceID: PropTypes.string,
32
-
33
- /**
34
- * Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style.
35
- */
36
- sourceLayerID: PropTypes.string,
37
-
38
- /**
39
- * Inserts a layer above aboveLayerID.
40
- */
41
- aboveLayerID: PropTypes.string,
42
-
43
- /**
44
- * Inserts a layer below belowLayerID
45
- */
46
- belowLayerID: PropTypes.string,
47
-
48
- /**
49
- * Inserts a layer at a specified index
50
- */
51
- layerIndex: PropTypes.number,
52
-
53
- /**
54
- * Filter only the features in the source layer that satisfy a condition that you define
55
- */
56
- filter: PropTypes.array,
57
-
58
- /**
59
- * The minimum zoom level at which the layer gets parsed and appears.
60
- */
61
- minZoomLevel: PropTypes.number,
62
-
63
- /**
64
- * The maximum zoom level at which the layer gets parsed and appears.
65
- */
66
- maxZoomLevel: PropTypes.number,
67
-
68
- /**
69
- * Customizable style attributes
70
- */
71
- style: PropTypes.oneOfType([
72
- FillExtrusionLayerStyleProp,
73
- PropTypes.arrayOf(FillExtrusionLayerStyleProp),
74
- ]),
75
- };
76
-
77
- static defaultProps = {
78
- sourceID: MapboxGL.StyleSource.DefaultSourceID,
79
- };
80
-
81
- render() {
82
- const props = {
83
- ...this.baseProps,
84
- sourceLayerID: this.props.sourceLayerID,
85
- };
86
- return <RCTMGLFillExtrusionLayer ref={this.setNativeLayer} {...props} />;
87
- }
88
- }
89
-
90
- const RCTMGLFillExtrusionLayer = requireNativeComponent(
91
- NATIVE_MODULE_NAME,
92
- FillExtrusionLayer,
93
- {
94
- nativeOnly: { reactStyle: true },
95
- },
96
- );
97
-
98
- export default FillExtrusionLayer;
@@ -1,99 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { NativeModules, requireNativeComponent } from 'react-native';
4
-
5
- import { viewPropTypes } from '../utils';
6
- import { HeatmapLayerStyleProp } from '../utils/styleMap';
7
-
8
- import AbstractLayer from './AbstractLayer';
9
-
10
- const MapboxGL = NativeModules.MGLModule;
11
-
12
- export const NATIVE_MODULE_NAME = 'RCTMGLHeatmapLayer';
13
-
14
- /**
15
- * HeatmapLayer is a style layer that renders one or more filled circles on the map.
16
- */
17
- class HeatmapLayer extends AbstractLayer {
18
- static propTypes = {
19
- ...viewPropTypes,
20
-
21
- /**
22
- * A string that uniquely identifies the source in the style to which it is added.
23
- */
24
- id: PropTypes.string.isRequired,
25
-
26
- /**
27
- * The source from which to obtain the data to style.
28
- * If the source has not yet been added to the current style, the behavior is undefined.
29
- * Inferred from parent source only if the layer is a direct child to it.
30
- */
31
- sourceID: PropTypes.string,
32
-
33
- /**
34
- * Identifier of the layer within the source identified by the sourceID property
35
- * from which the receiver obtains the data to style.
36
- */
37
- sourceLayerID: PropTypes.string,
38
-
39
- /**
40
- * Inserts a layer above aboveLayerID.
41
- */
42
- aboveLayerID: PropTypes.string,
43
-
44
- /**
45
- * Inserts a layer below belowLayerID
46
- */
47
- belowLayerID: PropTypes.string,
48
-
49
- /**
50
- * Inserts a layer at a specified index
51
- */
52
- layerIndex: PropTypes.number,
53
-
54
- /**
55
- * Filter only the features in the source layer that satisfy a condition that you define
56
- */
57
- filter: PropTypes.array,
58
-
59
- /**
60
- * The minimum zoom level at which the layer gets parsed and appears.
61
- */
62
- minZoomLevel: PropTypes.number,
63
-
64
- /**
65
- * The maximum zoom level at which the layer gets parsed and appears.
66
- */
67
- maxZoomLevel: PropTypes.number,
68
-
69
- /**
70
- * Customizable style attributes
71
- */
72
- style: PropTypes.oneOfType([
73
- HeatmapLayerStyleProp,
74
- PropTypes.arrayOf(HeatmapLayerStyleProp),
75
- ]),
76
- };
77
-
78
- static defaultProps = {
79
- sourceID: MapboxGL.StyleSource.DefaultSourceID,
80
- };
81
-
82
- render() {
83
- const props = {
84
- ...this.baseProps,
85
- sourceLayerID: this.props.sourceLayerID,
86
- };
87
- return <RCTMGLHeatmapLayer ref={this.setNativeLayer} {...props} />;
88
- }
89
- }
90
-
91
- const RCTMGLHeatmapLayer = requireNativeComponent(
92
- NATIVE_MODULE_NAME,
93
- HeatmapLayer,
94
- {
95
- nativeOnly: { reactStyle: true },
96
- },
97
- );
98
-
99
- export default HeatmapLayer;
@@ -1,41 +0,0 @@
1
- import React from 'react';
2
- import { requireNativeComponent } from 'react-native';
3
- import PropTypes from 'prop-types';
4
-
5
- const NATIVE_MODULE_NAME = 'RCTMGLNativeUserLocation';
6
-
7
- class NativeUserLocation extends React.Component {
8
- static propTypes = {
9
- /**
10
- * Android render mode.
11
- *
12
- * - normal: just a circle
13
- * - compass: triangle with heading
14
- * - gps: large arrow
15
- *
16
- * @platform android
17
- */
18
- androidRenderMode: PropTypes.oneOf(['normal', 'compass', 'gps']),
19
-
20
- /**
21
- * iOS only. A Boolean value indicating whether the user location annotation may display a permanent heading indicator.
22
- *
23
- * @platform ios
24
- */
25
- iosShowsUserHeadingIndicator: PropTypes.bool,
26
- };
27
-
28
- render() {
29
- return <RCTMGLNativeUserLocation {...this.props} />;
30
- }
31
- }
32
-
33
- const RCTMGLNativeUserLocation = requireNativeComponent(
34
- NATIVE_MODULE_NAME,
35
- NativeUserLocation,
36
- {
37
- nativeOnly: {},
38
- },
39
- );
40
-
41
- export default NativeUserLocation;
@@ -1,95 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { NativeModules, requireNativeComponent } from 'react-native';
4
-
5
- import { viewPropTypes } from '../utils';
6
- import { RasterLayerStyleProp } from '../utils/styleMap';
7
-
8
- import AbstractLayer from './AbstractLayer';
9
-
10
- const MapboxGL = NativeModules.MGLModule;
11
-
12
- export const NATIVE_MODULE_NAME = 'RCTMGLRasterLayer';
13
-
14
- class RasterLayer extends AbstractLayer {
15
- static propTypes = {
16
- ...viewPropTypes,
17
-
18
- /**
19
- * A string that uniquely identifies the source in the style to which it is added.
20
- */
21
- id: PropTypes.string.isRequired,
22
-
23
- /**
24
- * The source from which to obtain the data to style.
25
- * If the source has not yet been added to the current style, the behavior is undefined.
26
- * Inferred from parent source only if the layer is a direct child to it.
27
- */
28
- sourceID: PropTypes.string,
29
-
30
- /**
31
- * Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style.
32
- */
33
- sourceLayerID: PropTypes.string,
34
-
35
- /**
36
- * Inserts a layer above aboveLayerID.
37
- */
38
- aboveLayerID: PropTypes.string,
39
-
40
- /**
41
- * Inserts a layer below belowLayerID
42
- */
43
- belowLayerID: PropTypes.string,
44
-
45
- /**
46
- * Inserts a layer at a specified index
47
- */
48
- layerIndex: PropTypes.number,
49
-
50
- /**
51
- * Filter only the features in the source layer that satisfy a condition that you define
52
- */
53
- filter: PropTypes.array,
54
-
55
- /**
56
- * The minimum zoom level at which the layer gets parsed and appears.
57
- */
58
- minZoomLevel: PropTypes.number,
59
-
60
- /**
61
- * The maximum zoom level at which the layer gets parsed and appears.
62
- */
63
- maxZoomLevel: PropTypes.number,
64
-
65
- /**
66
- * Customizable style attributes
67
- */
68
- style: PropTypes.oneOfType([
69
- RasterLayerStyleProp,
70
- PropTypes.arrayOf(RasterLayerStyleProp),
71
- ]),
72
- };
73
-
74
- static defaultProps = {
75
- sourceID: MapboxGL.StyleSource.DefaultSourceID,
76
- };
77
-
78
- render() {
79
- const props = {
80
- ...this.baseProps,
81
- sourceLayerID: this.props.sourceLayerID,
82
- };
83
- return <RCTMGLRasterLayer ref={this.setNativeLayer} {...props} />;
84
- }
85
- }
86
-
87
- const RCTMGLRasterLayer = requireNativeComponent(
88
- NATIVE_MODULE_NAME,
89
- RasterLayer,
90
- {
91
- nativeOnly: { reactStyle: true },
92
- },
93
- );
94
-
95
- export default RasterLayer;
@@ -1,80 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { NativeModules, requireNativeComponent } from 'react-native';
4
-
5
- import { viewPropTypes } from '../utils';
6
- import { SkyLayerStyleProp } from '../utils/styleMap';
7
-
8
- import AbstractLayer from './AbstractLayer';
9
-
10
- const MapboxGL = NativeModules.MGLModule;
11
-
12
- export const NATIVE_MODULE_NAME = 'RCTMGLSkyLayer';
13
-
14
- /**
15
- * SkyLayer is a spherical dome around the map that is always rendered behind all other layers
16
- */
17
- class SkyLayer extends AbstractLayer {
18
- static propTypes = {
19
- ...viewPropTypes,
20
-
21
- /**
22
- * A string that uniquely identifies the source in the style to which it is added.
23
- */
24
- id: PropTypes.string.isRequired,
25
-
26
- /**
27
- * The source from which to obtain the data to style.
28
- * If the source has not yet been added to the current style, the behavior is undefined.
29
- */
30
- sourceID: PropTypes.string,
31
-
32
- /**
33
- * Inserts a layer above aboveLayerID.
34
- */
35
- aboveLayerID: PropTypes.string,
36
-
37
- /**
38
- * Inserts a layer below belowLayerID
39
- */
40
- belowLayerID: PropTypes.string,
41
-
42
- /**
43
- * Inserts a layer at a specified index
44
- */
45
- layerIndex: PropTypes.number,
46
-
47
- /**
48
- * Filter only the features in the source layer that satisfy a condition that you define
49
- */
50
- filter: PropTypes.array,
51
-
52
- /**
53
- * Customizable style attributes
54
- */
55
- style: PropTypes.oneOfType([
56
- SkyLayerStyleProp,
57
- PropTypes.arrayOf(SkyLayerStyleProp),
58
- ]),
59
- };
60
-
61
- static defaultProps = {
62
- sourceID: MapboxGL.StyleSource.DefaultSourceID,
63
- };
64
-
65
- render() {
66
- return (
67
- <RCTMGLSkyLayer
68
- testID="rctmglSkyLayer"
69
- ref={this.setNativeLayer}
70
- {...this.baseProps}
71
- />
72
- );
73
- }
74
- }
75
-
76
- const RCTMGLSkyLayer = requireNativeComponent(NATIVE_MODULE_NAME, SkyLayer, {
77
- nativeOnly: { reactStyle: true },
78
- });
79
-
80
- export default SkyLayer;