@rnmapbox/maps 10.0.0-beta.53 → 10.0.0-beta.54
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/app.plugin.js +1 -0
- package/index.d.ts +27 -4
- package/ios/RCTMGL-v10/MGLModule.m +3 -1
- package/ios/RCTMGL-v10/MGLModule.swift +9 -1
- package/javascript/components/AbstractLayer.tsx +4 -4
- package/javascript/components/LineLayer.tsx +91 -0
- package/javascript/components/SymbolLayer.tsx +1 -1
- package/javascript/utils/MapboxStyles.d.ts +2 -0
- package/javascript/utils/StyleValue.ts +1 -1
- package/lib/commonjs/components/AbstractLayer.js.map +1 -1
- package/lib/commonjs/components/LineLayer.js +2 -55
- package/lib/commonjs/components/LineLayer.js.map +1 -1
- package/lib/commonjs/utils/MapboxStyles.d.js.map +1 -1
- package/lib/commonjs/utils/StyleValue.js.map +1 -1
- package/lib/module/components/AbstractLayer.js.map +1 -1
- package/lib/module/components/LineLayer.js +1 -54
- package/lib/module/components/LineLayer.js.map +1 -1
- package/lib/module/utils/MapboxStyles.d.js.map +1 -1
- package/lib/module/utils/StyleValue.js.map +1 -1
- package/lib/typescript/components/AbstractLayer.d.ts +4 -4
- package/lib/typescript/components/AbstractLayer.d.ts.map +1 -1
- package/lib/typescript/components/LineLayer.d.ts +65 -0
- package/lib/typescript/components/LineLayer.d.ts.map +1 -0
- package/lib/typescript/components/SymbolLayer.d.ts +1 -1
- package/lib/typescript/components/SymbolLayer.d.ts.map +1 -1
- package/lib/typescript/utils/StyleValue.d.ts +1 -1
- package/lib/typescript/utils/StyleValue.d.ts.map +1 -1
- package/package.json +2 -1
- package/javascript/components/LineLayer.js +0 -94
package/app.plugin.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./plugin/build/withMapbox');
|
package/index.d.ts
CHANGED
|
@@ -22,7 +22,10 @@ import {
|
|
|
22
22
|
FeatureCollection,
|
|
23
23
|
} from '@turf/helpers';
|
|
24
24
|
|
|
25
|
-
import type {
|
|
25
|
+
import type {
|
|
26
|
+
SymbolLayerStyleProps,
|
|
27
|
+
LineLayerStyleProps,
|
|
28
|
+
} from './javascript/utils/MapboxStyles';
|
|
26
29
|
import {
|
|
27
30
|
Camera as _Camera,
|
|
28
31
|
CameraStop as _CameraStop,
|
|
@@ -43,6 +46,10 @@ import {
|
|
|
43
46
|
SymbolLayer as _SymbolLayer,
|
|
44
47
|
Props as _SymbolLayerProps,
|
|
45
48
|
} from './javascript/components/SymbolLayer';
|
|
49
|
+
import {
|
|
50
|
+
LineLayer as _LineLayer,
|
|
51
|
+
Props as _LineLayerProps,
|
|
52
|
+
} from './javascript/components/LineLayer';
|
|
46
53
|
import {
|
|
47
54
|
ShapeSource as _ShapeSource,
|
|
48
55
|
Props as _ShapeSourceProps,
|
|
@@ -107,7 +114,7 @@ type NamedStyles<T> = {
|
|
|
107
114
|
[P in keyof T]:
|
|
108
115
|
| SymbolLayerStyleProps
|
|
109
116
|
| RasterLayerStyle
|
|
110
|
-
|
|
|
117
|
+
| LineLayerStyleProps
|
|
111
118
|
| FillLayerStyle
|
|
112
119
|
| FillExtrusionLayerStyle
|
|
113
120
|
| CircleLayerStyle
|
|
@@ -152,6 +159,7 @@ declare namespace MapboxGL {
|
|
|
152
159
|
const MarkerView = _MarkerView;
|
|
153
160
|
const PointAnnotation = _PointAnnotation;
|
|
154
161
|
const SymbolLayer = _SymbolLayer;
|
|
162
|
+
const LineLayer = _LineLayer;
|
|
155
163
|
const ShapeSource = _ShapeSource;
|
|
156
164
|
type ShapeSource = _ShapeSource;
|
|
157
165
|
|
|
@@ -187,6 +195,21 @@ declare namespace MapboxGL {
|
|
|
187
195
|
constructor(shape: _AnimatedShape);
|
|
188
196
|
}
|
|
189
197
|
|
|
198
|
+
class _TileServers {
|
|
199
|
+
Mapbox: string;
|
|
200
|
+
MapLibre?: string;
|
|
201
|
+
MapTiler?: string;
|
|
202
|
+
}
|
|
203
|
+
const TileServers: _TileServers;
|
|
204
|
+
|
|
205
|
+
class _OfflinePackDownloadState {
|
|
206
|
+
Inactive: string | number;
|
|
207
|
+
Active: string | number;
|
|
208
|
+
Complete: string | number;
|
|
209
|
+
Unknown?: string | number;
|
|
210
|
+
}
|
|
211
|
+
const OfflinePackDownloadState: _OfflinePackDownloadState;
|
|
212
|
+
|
|
190
213
|
/**
|
|
191
214
|
* GeoUtils
|
|
192
215
|
*/
|
|
@@ -256,7 +279,7 @@ declare namespace MapboxGL {
|
|
|
256
279
|
// layers
|
|
257
280
|
class FillLayer extends Component<FillLayerProps> {}
|
|
258
281
|
class FillExtrusionLayer extends Component<FillExtrusionLayerProps> {}
|
|
259
|
-
class LineLayer extends Component<
|
|
282
|
+
class LineLayer extends Component<_LineLayerProps> {}
|
|
260
283
|
class CircleLayer extends Component<CircleLayerProps> {}
|
|
261
284
|
class SymbolLayer extends Component<_SymbolLayerProps> {}
|
|
262
285
|
class RasterLayer extends Component<RasterLayerProps> {}
|
|
@@ -737,8 +760,8 @@ export type TextVariableAnchorValues =
|
|
|
737
760
|
| 'bottom-left'
|
|
738
761
|
| 'bottom-right';
|
|
739
762
|
|
|
740
|
-
/** @deprecated Will be removed in next betas */
|
|
741
763
|
export type SymbolLayerStyle = SymbolLayerStyleProps;
|
|
764
|
+
export type LineLayerStyle = LineLayerStyleProps;
|
|
742
765
|
|
|
743
766
|
export interface HeatmapLayerStyle {
|
|
744
767
|
visibility?: Visibility | Expression;
|
|
@@ -7,6 +7,8 @@ RCT_EXTERN_METHOD(setAccessToken:(NSString *)accessToken resolver:(RCTPromiseRes
|
|
|
7
7
|
RCT_EXTERN_METHOD(addCustomHeader:(NSString *)headerName forHeaderValue:(NSString *) headerValue)
|
|
8
8
|
RCT_EXTERN_METHOD(removeCustomHeader:(NSString *)headerName)
|
|
9
9
|
|
|
10
|
-
RCT_EXTERN_METHOD(setTelemetryEnabled:(BOOL)telemetryEnabled
|
|
10
|
+
RCT_EXTERN_METHOD(setTelemetryEnabled:(BOOL)telemetryEnabled)
|
|
11
|
+
RCT_EXTERN_METHOD(setWellKnownTileServer:(NSString *)tileServer)
|
|
12
|
+
|
|
11
13
|
|
|
12
14
|
@end
|
|
@@ -61,7 +61,9 @@ class MGLModule : NSObject {
|
|
|
61
61
|
[
|
|
62
62
|
"Error": RCTMGLOfflineModule.Callbacks.error.rawValue,
|
|
63
63
|
"Progress": RCTMGLOfflineModule.Callbacks.progress.rawValue
|
|
64
|
-
]
|
|
64
|
+
],
|
|
65
|
+
"TileServers":
|
|
66
|
+
["Mapbox": "mapbox"]
|
|
65
67
|
];
|
|
66
68
|
}
|
|
67
69
|
|
|
@@ -89,4 +91,10 @@ class MGLModule : NSObject {
|
|
|
89
91
|
@objc func setTelemetryEnabled(_ telemetryEnabled: Bool) {
|
|
90
92
|
UserDefaults.mme_configuration().mme_isCollectionEnabled = telemetryEnabled
|
|
91
93
|
}
|
|
94
|
+
|
|
95
|
+
@objc func setWellKnownTileServer(_ tileServer: String) {
|
|
96
|
+
if tileServer != "mapbox" {
|
|
97
|
+
Logger.error("setWellKnownTileServer: \(tileServer) should be mapbox")
|
|
98
|
+
}
|
|
99
|
+
}
|
|
92
100
|
}
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { NativeMethods, processColor } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import { getFilter } from '../utils/filterUtils';
|
|
6
|
-
import { AllLayerStyleProps,
|
|
6
|
+
import { AllLayerStyleProps, FilterExpression } from '../utils/MapboxStyles';
|
|
7
7
|
import { transformStyle } from '../utils/StyleValue';
|
|
8
8
|
|
|
9
9
|
type PropsBase = {
|
|
@@ -14,8 +14,8 @@ type PropsBase = {
|
|
|
14
14
|
aboveLayerID?: string;
|
|
15
15
|
belowLayerID?: string;
|
|
16
16
|
layerIndex?: number;
|
|
17
|
-
filter?:
|
|
18
|
-
style
|
|
17
|
+
filter?: FilterExpression;
|
|
18
|
+
style?: AllLayerStyleProps;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
class AbstractLayer<
|
|
@@ -55,7 +55,7 @@ class AbstractLayer<
|
|
|
55
55
|
return undefined;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
getStyle(style: AllLayerStyleProps) {
|
|
58
|
+
getStyle(style: AllLayerStyleProps | undefined) {
|
|
59
59
|
return transformStyle(style);
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NativeModules, requireNativeComponent } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { FilterExpression, LineLayerStyleProps } 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 = 'RCTMGLLineLayer';
|
|
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?: LineLayerStyleProps;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
type NativeTypeProps = Omit<Props, 'style'> & {
|
|
68
|
+
reactStyle?: { [key: string]: StyleValue };
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* LineLayer is a style layer that renders one or more stroked polylines on the map.
|
|
73
|
+
*/
|
|
74
|
+
class LineLayer extends AbstractLayer<Props, NativeTypeProps> {
|
|
75
|
+
static defaultProps = {
|
|
76
|
+
sourceID: MapboxGL.StyleSource.DefaultSourceID,
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
render() {
|
|
80
|
+
const props = {
|
|
81
|
+
...this.baseProps,
|
|
82
|
+
sourceLayerID: this.props.sourceLayerID,
|
|
83
|
+
};
|
|
84
|
+
return <RCTMGLLineLayer ref={this.setNativeLayer} {...props} />;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const RCTMGLLineLayer =
|
|
89
|
+
requireNativeComponent<NativeTypeProps>(NATIVE_MODULE_NAME);
|
|
90
|
+
|
|
91
|
+
export default LineLayer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AbstractLayer","React","PureComponent","undefined","instance","nativeLayer","baseProps","props","id","sourceID","reactStyle","getStyle","style","minZoomLevel","maxZoomLevel","aboveLayerID","belowLayerID","layerIndex","filter","getFilter","getStyleTypeFormatter","styleType","processColor","transformStyle","setNativeProps","propsToPass"],"sourceRoot":"../../javascript","sources":["AbstractLayer.tsx"],"mappings":";;;;;;AACA;AACA;AAEA;AAEA;AAAqD;AAAA;AAcrD,MAAMA,aAAa,SAGTC,cAAK,CAACC,aAAa,CAAY;EAAA;IAAA;IAAA,qCAmBvBC,SAAS;IAAA,wCAGvBC,QAAoE,IACjE;MACH,IAAI,CAACC,WAAW,GAAGD,QAAQ;IAC7B,CAAC;EAAA;EAxBD,IAAIE,SAAS,GAAc;IACzB,OAAO;MACL,GAAG,IAAI,CAACC,KAAK;MACbC,EAAE,EAAE,IAAI,CAACD,KAAK,CAACC,EAAE;MACjBC,QAAQ,EAAE,IAAI,CAACF,KAAK,CAACE,QAAQ;MAC7BC,UAAU,EAAE,IAAI,CAACC,QAAQ,CAAC,IAAI,CAACJ,KAAK,CAACK,KAAK,CAAC;MAC3CC,YAAY,EAAE,IAAI,CAACN,KAAK,CAACM,YAAY;MACrCC,YAAY,EAAE,IAAI,CAACP,KAAK,CAACO,YAAY;MACrCC,YAAY,EAAE,IAAI,CAACR,KAAK,CAACQ,YAAY;MACrCC,YAAY,EAAE,IAAI,CAACT,KAAK,CAACS,YAAY;MACrCC,UAAU,EAAE,IAAI,CAACV,KAAK,CAACU,UAAU;MACjCC,MAAM,EAAE,IAAAC,sBAAS,EAAC,IAAI,CAACZ,KAAK,CAACW,MAAM,CAAC;MACpCN,KAAK,EAAET;IACT,CAAC;EACH;EAYAiB,qBAAqB,CAACC,SAAiB,EAAE;IACvC,IAAIA,SAAS,KAAK,OAAO,EAAE;MACzB,OAAOC,yBAAY;IACrB;IACA,OAAOnB,SAAS;EAClB;EAEAQ,QAAQ,CAACC,
|
|
1
|
+
{"version":3,"names":["AbstractLayer","React","PureComponent","undefined","instance","nativeLayer","baseProps","props","id","sourceID","reactStyle","getStyle","style","minZoomLevel","maxZoomLevel","aboveLayerID","belowLayerID","layerIndex","filter","getFilter","getStyleTypeFormatter","styleType","processColor","transformStyle","setNativeProps","propsToPass"],"sourceRoot":"../../javascript","sources":["AbstractLayer.tsx"],"mappings":";;;;;;AACA;AACA;AAEA;AAEA;AAAqD;AAAA;AAcrD,MAAMA,aAAa,SAGTC,cAAK,CAACC,aAAa,CAAY;EAAA;IAAA;IAAA,qCAmBvBC,SAAS;IAAA,wCAGvBC,QAAoE,IACjE;MACH,IAAI,CAACC,WAAW,GAAGD,QAAQ;IAC7B,CAAC;EAAA;EAxBD,IAAIE,SAAS,GAAc;IACzB,OAAO;MACL,GAAG,IAAI,CAACC,KAAK;MACbC,EAAE,EAAE,IAAI,CAACD,KAAK,CAACC,EAAE;MACjBC,QAAQ,EAAE,IAAI,CAACF,KAAK,CAACE,QAAQ;MAC7BC,UAAU,EAAE,IAAI,CAACC,QAAQ,CAAC,IAAI,CAACJ,KAAK,CAACK,KAAK,CAAC;MAC3CC,YAAY,EAAE,IAAI,CAACN,KAAK,CAACM,YAAY;MACrCC,YAAY,EAAE,IAAI,CAACP,KAAK,CAACO,YAAY;MACrCC,YAAY,EAAE,IAAI,CAACR,KAAK,CAACQ,YAAY;MACrCC,YAAY,EAAE,IAAI,CAACT,KAAK,CAACS,YAAY;MACrCC,UAAU,EAAE,IAAI,CAACV,KAAK,CAACU,UAAU;MACjCC,MAAM,EAAE,IAAAC,sBAAS,EAAC,IAAI,CAACZ,KAAK,CAACW,MAAM,CAAC;MACpCN,KAAK,EAAET;IACT,CAAC;EACH;EAYAiB,qBAAqB,CAACC,SAAiB,EAAE;IACvC,IAAIA,SAAS,KAAK,OAAO,EAAE;MACzB,OAAOC,yBAAY;IACrB;IACA,OAAOnB,SAAS;EAClB;EAEAQ,QAAQ,CAACC,KAAqC,EAAE;IAC9C,OAAO,IAAAW,0BAAc,EAACX,KAAK,CAAC;EAC9B;EAEAY,cAAc,CAACjB,KAAiC,EAAE;IAChD,IAAI,IAAI,CAACF,WAAW,EAAE;MAAA;MACpB,IAAIoB,WAAW,GAAGlB,KAAK;MACvB,IAAIA,KAAK,CAACK,KAAK,EAAE;QACfa,WAAW,GAAG;UACZ,GAAGlB,KAAK;UACRG,UAAU,EAAE,IAAI,CAACC,QAAQ,CAACJ,KAAK,CAACK,KAAK;QACvC,CAAC;MACH;MACA,yBAAI,CAACP,WAAW,sDAAhB,kBAAkBmB,cAAc,CAACC,WAAW,CAAC;IAC/C;EACF;AACF;AAAC,eAEczB,aAAa;AAAA"}
|
|
@@ -5,21 +5,17 @@ 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); }
|
|
15
12
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
13
|
const MapboxGL = _reactNative.NativeModules.MGLModule;
|
|
17
14
|
const NATIVE_MODULE_NAME = 'RCTMGLLineLayer';
|
|
18
|
-
|
|
15
|
+
exports.NATIVE_MODULE_NAME = NATIVE_MODULE_NAME;
|
|
19
16
|
/**
|
|
20
17
|
* LineLayer is a style layer that renders one or more stroked polylines on the map.
|
|
21
18
|
*/
|
|
22
|
-
exports.NATIVE_MODULE_NAME = NATIVE_MODULE_NAME;
|
|
23
19
|
class LineLayer extends _AbstractLayer.default {
|
|
24
20
|
render() {
|
|
25
21
|
const props = {
|
|
@@ -31,59 +27,10 @@ class LineLayer extends _AbstractLayer.default {
|
|
|
31
27
|
}, props));
|
|
32
28
|
}
|
|
33
29
|
}
|
|
34
|
-
_defineProperty(LineLayer, "propTypes", {
|
|
35
|
-
..._utils.viewPropTypes,
|
|
36
|
-
/**
|
|
37
|
-
* A string that uniquely identifies the source in the style to which it is added.
|
|
38
|
-
*/
|
|
39
|
-
id: _propTypes.default.string.isRequired,
|
|
40
|
-
/**
|
|
41
|
-
* The source from which to obtain the data to style.
|
|
42
|
-
* If the source has not yet been added to the current style, the behavior is undefined.
|
|
43
|
-
* Inferred from parent source only if the layer is a direct child to it.
|
|
44
|
-
*/
|
|
45
|
-
sourceID: _propTypes.default.string,
|
|
46
|
-
/**
|
|
47
|
-
* Identifier of the layer within the source identified by the sourceID property 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.LineLayerStyleProp, _propTypes.default.arrayOf(_styleMap.LineLayerStyleProp)])
|
|
78
|
-
});
|
|
79
30
|
_defineProperty(LineLayer, "defaultProps", {
|
|
80
31
|
sourceID: MapboxGL.StyleSource.DefaultSourceID
|
|
81
32
|
});
|
|
82
|
-
const RCTMGLLineLayer = (0, _reactNative.requireNativeComponent)(NATIVE_MODULE_NAME
|
|
83
|
-
nativeOnly: {
|
|
84
|
-
reactStyle: true
|
|
85
|
-
}
|
|
86
|
-
});
|
|
33
|
+
const RCTMGLLineLayer = (0, _reactNative.requireNativeComponent)(NATIVE_MODULE_NAME);
|
|
87
34
|
var _default = LineLayer;
|
|
88
35
|
exports.default = _default;
|
|
89
36
|
//# sourceMappingURL=LineLayer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MapboxGL","NativeModules","MGLModule","NATIVE_MODULE_NAME","LineLayer","AbstractLayer","render","props","baseProps","sourceLayerID","setNativeLayer","
|
|
1
|
+
{"version":3,"names":["MapboxGL","NativeModules","MGLModule","NATIVE_MODULE_NAME","LineLayer","AbstractLayer","render","props","baseProps","sourceLayerID","setNativeLayer","sourceID","StyleSource","DefaultSourceID","RCTMGLLineLayer","requireNativeComponent"],"sourceRoot":"../../javascript","sources":["LineLayer.tsx"],"mappings":";;;;;;AAAA;AACA;AAKA;AAA4C;AAAA;AAAA;AAE5C,MAAMA,QAAQ,GAAGC,0BAAa,CAACC,SAAS;AAEjC,MAAMC,kBAAkB,GAAG,iBAAiB;AAAC;AA4DpD;AACA;AACA;AACA,MAAMC,SAAS,SAASC,sBAAa,CAAyB;EAK5DC,MAAM,GAAG;IACP,MAAMC,KAAK,GAAG;MACZ,GAAG,IAAI,CAACC,SAAS;MACjBC,aAAa,EAAE,IAAI,CAACF,KAAK,CAACE;IAC5B,CAAC;IACD,oBAAO,6BAAC,eAAe;MAAC,GAAG,EAAE,IAAI,CAACC;IAAe,GAAKH,KAAK,EAAI;EACjE;AACF;AAAC,gBAZKH,SAAS,kBACS;EACpBO,QAAQ,EAAEX,QAAQ,CAACY,WAAW,CAACC;AACjC,CAAC;AAWH,MAAMC,eAAe,GACnB,IAAAC,mCAAsB,EAAkBZ,kBAAkB,CAAC;AAAC,eAE/CC,SAAS;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["VisibilityEnum","FillTranslateAnchorEnum","LineCapEnum","LineJoinEnum","LineTranslateAnchorEnum","SymbolPlacementEnum","SymbolZOrderEnum","IconRotationAlignmentEnum","IconTextFitEnum","IconAnchorEnum","IconPitchAlignmentEnum","TextPitchAlignmentEnum","TextRotationAlignmentEnum","TextJustifyEnum","TextVariableAnchorEnum","TextAnchorEnum","TextWritingModeEnum","TextTransformEnum","IconTranslateAnchorEnum","TextTranslateAnchorEnum","CircleTranslateAnchorEnum","CirclePitchScaleEnum","CirclePitchAlignmentEnum","FillExtrusionTranslateAnchorEnum","RasterResamplingEnum","HillshadeIlluminationAnchorEnum","SkyTypeEnum","AnchorEnum"],"sourceRoot":"../../javascript","sources":["MapboxStyles.d.ts"],"mappings":";;;;;AAAA;AAUsC;
|
|
1
|
+
{"version":3,"names":["VisibilityEnum","FillTranslateAnchorEnum","LineCapEnum","LineJoinEnum","LineTranslateAnchorEnum","SymbolPlacementEnum","SymbolZOrderEnum","IconRotationAlignmentEnum","IconTextFitEnum","IconAnchorEnum","IconPitchAlignmentEnum","TextPitchAlignmentEnum","TextRotationAlignmentEnum","TextJustifyEnum","TextVariableAnchorEnum","TextAnchorEnum","TextWritingModeEnum","TextTransformEnum","IconTranslateAnchorEnum","TextTranslateAnchorEnum","CircleTranslateAnchorEnum","CirclePitchScaleEnum","CirclePitchAlignmentEnum","FillExtrusionTranslateAnchorEnum","RasterResamplingEnum","HillshadeIlluminationAnchorEnum","SkyTypeEnum","AnchorEnum"],"sourceRoot":"../../javascript","sources":["MapboxStyles.d.ts"],"mappings":";;;;;AAAA;AAUsC;AAuHtC;AAAA,IAKKA,cAAc;AAAA,WAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;AAAA,GAAdA,cAAc,KAAdA,cAAc;AAAA,IAOdC,uBAAuB;AAAA,WAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;AAAA,GAAvBA,uBAAuB,KAAvBA,uBAAuB;AAAA,IAOvBC,WAAW;AAAA,WAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;AAAA,GAAXA,WAAW,KAAXA,WAAW;AAAA,IASXC,YAAY;AAAA,WAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;AAAA,GAAZA,YAAY,KAAZA,YAAY;AAAA,IASZC,uBAAuB;AAAA,WAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;AAAA,GAAvBA,uBAAuB,KAAvBA,uBAAuB;AAAA,IAOvBC,mBAAmB;AAAA,WAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;AAAA,GAAnBA,mBAAmB,KAAnBA,mBAAmB;AAAA,IASnBC,gBAAgB;AAAA,WAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;AAAA,GAAhBA,gBAAgB,KAAhBA,gBAAgB;AAAA,IAShBC,yBAAyB;AAAA,WAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;AAAA,GAAzBA,yBAAyB,KAAzBA,yBAAyB;AAAA,IASzBC,eAAe;AAAA,WAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;AA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,WAAW;AAAA,IAOXC,UAAU;AAAA,WAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;AAAA,GAAVA,UAAU,KAAVA,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["transformStyle","style","nativeStyle","styleProps","Object","keys","styleProp","styleType","getStyleType","rawStyle","color","processColor","undefined","console","error","Image","resolveAssetSource","bridgeValue","BridgeValue","styletype","stylevalue","toJSON"],"sourceRoot":"../../javascript","sources":["StyleValue.ts"],"mappings":";;;;;;AAAA;AAEA;AAKA;AAA0C;AAOnC,SAASA,cAAc,CAC5BC,
|
|
1
|
+
{"version":3,"names":["transformStyle","style","nativeStyle","styleProps","Object","keys","styleProp","styleType","getStyleType","rawStyle","color","processColor","undefined","console","error","Image","resolveAssetSource","bridgeValue","BridgeValue","styletype","stylevalue","toJSON"],"sourceRoot":"../../javascript","sources":["StyleValue.ts"],"mappings":";;;;;;AAAA;AAEA;AAKA;AAA0C;AAOnC,SAASA,cAAc,CAC5BC,KAAqC,EACM;EAC3C,IAAI,CAACA,KAAK,EAAE;IACV;EACF;EAEA,MAAMC,WAA0C,GAAG,CAAC,CAAC;EACrD,MAAMC,UAAU,GAAGC,MAAM,CAACC,IAAI,CAACJ,KAAK,CAA8B;EAClE,KAAK,MAAMK,SAAS,IAAIH,UAAU,EAAE;IAClC,MAAMI,SAAS,GAAG,IAAAC,sBAAY,EAACF,SAAS,CAAC;IACzC,IAAIG,QAAkC,GAAGR,KAAK,CAACK,SAAS,CAAC;IAEzD,IAAIC,SAAS,KAAK,OAAO,IAAI,OAAOE,QAAQ,KAAK,QAAQ,EAAE;MACzD,MAAMC,KAAK,GAAG,IAAAC,yBAAY,EAACF,QAAQ,CAAC;MACpC,IAAIC,KAAK,KAAK,IAAI,IAAIA,KAAK,KAAKE,SAAS,IAAI,OAAOF,KAAK,KAAK,QAAQ,EAAE;QACtEG,OAAO,CAACC,KAAK,CAAE,kCAAiCL,QAAS,YAAW,CAAC;QACrEA,QAAQ,GAAG,QAAQ;MACrB,CAAC,MAAM;QACLA,QAAQ,GAAGC,KAAK;MAClB;IACF,CAAC,MAAM,IAAIH,SAAS,KAAK,OAAO,IAAI,OAAOE,QAAQ,KAAK,QAAQ,EAAE;MAChEA,QAAQ,GACLM,kBAAK,CAACC,kBAAkB,CAACP,QAAQ,CAAC,IAAgC,CAAC,CAAC;IACzE;IAEA,IAAIA,QAAQ,KAAKG,SAAS,EAAE;MAC1B,MAAMK,WAAW,GAAG,IAAIC,oBAAW,CAACT,QAAQ,CAAC;MAC7CP,WAAW,CAACI,SAAS,CAAC,GAAG;QACvBa,SAAS,EAAEZ,SAAS;QACpBa,UAAU,EAAEH,WAAW,CAACI,MAAM;MAChC,CAAC;IACH;EACF;EAEA,OAAOnB,WAAW;AACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","processColor","getFilter","transformStyle","AbstractLayer","PureComponent","undefined","instance","nativeLayer","baseProps","props","id","sourceID","reactStyle","getStyle","style","minZoomLevel","maxZoomLevel","aboveLayerID","belowLayerID","layerIndex","filter","getStyleTypeFormatter","styleType","setNativeProps","propsToPass"],"sourceRoot":"../../javascript","sources":["AbstractLayer.tsx"],"mappings":";AAAA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAwBC,YAAY,QAAQ,cAAc;AAE1D,SAASC,SAAS,QAAQ,sBAAsB;AAEhD,SAASC,cAAc,QAAQ,qBAAqB;AAcpD,MAAMC,aAAa,SAGTJ,KAAK,CAACK,aAAa,CAAY;EAAA;IAAA;IAAA,qCAmBvBC,SAAS;IAAA,wCAGvBC,QAAoE,IACjE;MACH,IAAI,CAACC,WAAW,GAAGD,QAAQ;IAC7B,CAAC;EAAA;EAxBD,IAAIE,SAAS,GAAc;IACzB,OAAO;MACL,GAAG,IAAI,CAACC,KAAK;MACbC,EAAE,EAAE,IAAI,CAACD,KAAK,CAACC,EAAE;MACjBC,QAAQ,EAAE,IAAI,CAACF,KAAK,CAACE,QAAQ;MAC7BC,UAAU,EAAE,IAAI,CAACC,QAAQ,CAAC,IAAI,CAACJ,KAAK,CAACK,KAAK,CAAC;MAC3CC,YAAY,EAAE,IAAI,CAACN,KAAK,CAACM,YAAY;MACrCC,YAAY,EAAE,IAAI,CAACP,KAAK,CAACO,YAAY;MACrCC,YAAY,EAAE,IAAI,CAACR,KAAK,CAACQ,YAAY;MACrCC,YAAY,EAAE,IAAI,CAACT,KAAK,CAACS,YAAY;MACrCC,UAAU,EAAE,IAAI,CAACV,KAAK,CAACU,UAAU;MACjCC,MAAM,EAAEnB,SAAS,CAAC,IAAI,CAACQ,KAAK,CAACW,MAAM,CAAC;MACpCN,KAAK,EAAET;IACT,CAAC;EACH;EAYAgB,qBAAqB,CAACC,SAAiB,EAAE;IACvC,IAAIA,SAAS,KAAK,OAAO,EAAE;MACzB,OAAOtB,YAAY;IACrB;IACA,OAAOK,SAAS;EAClB;EAEAQ,QAAQ,CAACC,
|
|
1
|
+
{"version":3,"names":["React","processColor","getFilter","transformStyle","AbstractLayer","PureComponent","undefined","instance","nativeLayer","baseProps","props","id","sourceID","reactStyle","getStyle","style","minZoomLevel","maxZoomLevel","aboveLayerID","belowLayerID","layerIndex","filter","getStyleTypeFormatter","styleType","setNativeProps","propsToPass"],"sourceRoot":"../../javascript","sources":["AbstractLayer.tsx"],"mappings":";AAAA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAwBC,YAAY,QAAQ,cAAc;AAE1D,SAASC,SAAS,QAAQ,sBAAsB;AAEhD,SAASC,cAAc,QAAQ,qBAAqB;AAcpD,MAAMC,aAAa,SAGTJ,KAAK,CAACK,aAAa,CAAY;EAAA;IAAA;IAAA,qCAmBvBC,SAAS;IAAA,wCAGvBC,QAAoE,IACjE;MACH,IAAI,CAACC,WAAW,GAAGD,QAAQ;IAC7B,CAAC;EAAA;EAxBD,IAAIE,SAAS,GAAc;IACzB,OAAO;MACL,GAAG,IAAI,CAACC,KAAK;MACbC,EAAE,EAAE,IAAI,CAACD,KAAK,CAACC,EAAE;MACjBC,QAAQ,EAAE,IAAI,CAACF,KAAK,CAACE,QAAQ;MAC7BC,UAAU,EAAE,IAAI,CAACC,QAAQ,CAAC,IAAI,CAACJ,KAAK,CAACK,KAAK,CAAC;MAC3CC,YAAY,EAAE,IAAI,CAACN,KAAK,CAACM,YAAY;MACrCC,YAAY,EAAE,IAAI,CAACP,KAAK,CAACO,YAAY;MACrCC,YAAY,EAAE,IAAI,CAACR,KAAK,CAACQ,YAAY;MACrCC,YAAY,EAAE,IAAI,CAACT,KAAK,CAACS,YAAY;MACrCC,UAAU,EAAE,IAAI,CAACV,KAAK,CAACU,UAAU;MACjCC,MAAM,EAAEnB,SAAS,CAAC,IAAI,CAACQ,KAAK,CAACW,MAAM,CAAC;MACpCN,KAAK,EAAET;IACT,CAAC;EACH;EAYAgB,qBAAqB,CAACC,SAAiB,EAAE;IACvC,IAAIA,SAAS,KAAK,OAAO,EAAE;MACzB,OAAOtB,YAAY;IACrB;IACA,OAAOK,SAAS;EAClB;EAEAQ,QAAQ,CAACC,KAAqC,EAAE;IAC9C,OAAOZ,cAAc,CAACY,KAAK,CAAC;EAC9B;EAEAS,cAAc,CAACd,KAAiC,EAAE;IAChD,IAAI,IAAI,CAACF,WAAW,EAAE;MAAA;MACpB,IAAIiB,WAAW,GAAGf,KAAK;MACvB,IAAIA,KAAK,CAACK,KAAK,EAAE;QACfU,WAAW,GAAG;UACZ,GAAGf,KAAK;UACRG,UAAU,EAAE,IAAI,CAACC,QAAQ,CAACJ,KAAK,CAACK,KAAK;QACvC,CAAC;MACH;MACA,yBAAI,CAACP,WAAW,sDAAhB,kBAAkBgB,cAAc,CAACC,WAAW,CAAC;IAC/C;EACF;AACF;AAEA,eAAerB,aAAa"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
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); }
|
|
2
2
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
4
|
import { NativeModules, requireNativeComponent } from 'react-native';
|
|
6
|
-
import { viewPropTypes } from '../utils';
|
|
7
|
-
import { LineLayerStyleProp } from '../utils/styleMap';
|
|
8
5
|
import AbstractLayer from './AbstractLayer';
|
|
9
6
|
const MapboxGL = NativeModules.MGLModule;
|
|
10
7
|
export const NATIVE_MODULE_NAME = 'RCTMGLLineLayer';
|
|
11
|
-
|
|
12
8
|
/**
|
|
13
9
|
* LineLayer is a style layer that renders one or more stroked polylines on the map.
|
|
14
10
|
*/
|
|
@@ -23,58 +19,9 @@ class LineLayer extends AbstractLayer {
|
|
|
23
19
|
}, props));
|
|
24
20
|
}
|
|
25
21
|
}
|
|
26
|
-
_defineProperty(LineLayer, "propTypes", {
|
|
27
|
-
...viewPropTypes,
|
|
28
|
-
/**
|
|
29
|
-
* A string that uniquely identifies the source in the style to which it is added.
|
|
30
|
-
*/
|
|
31
|
-
id: PropTypes.string.isRequired,
|
|
32
|
-
/**
|
|
33
|
-
* The source from which to obtain the data to style.
|
|
34
|
-
* If the source has not yet been added to the current style, the behavior is undefined.
|
|
35
|
-
* Inferred from parent source only if the layer is a direct child to it.
|
|
36
|
-
*/
|
|
37
|
-
sourceID: PropTypes.string,
|
|
38
|
-
/**
|
|
39
|
-
* Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style.
|
|
40
|
-
*/
|
|
41
|
-
sourceLayerID: PropTypes.string,
|
|
42
|
-
/**
|
|
43
|
-
* Inserts a layer above aboveLayerID.
|
|
44
|
-
*/
|
|
45
|
-
aboveLayerID: PropTypes.string,
|
|
46
|
-
/**
|
|
47
|
-
* Inserts a layer below belowLayerID
|
|
48
|
-
*/
|
|
49
|
-
belowLayerID: PropTypes.string,
|
|
50
|
-
/**
|
|
51
|
-
* Inserts a layer at a specified index
|
|
52
|
-
*/
|
|
53
|
-
layerIndex: PropTypes.number,
|
|
54
|
-
/**
|
|
55
|
-
* Filter only the features in the source layer that satisfy a condition that you define
|
|
56
|
-
*/
|
|
57
|
-
filter: PropTypes.array,
|
|
58
|
-
/**
|
|
59
|
-
* The minimum zoom level at which the layer gets parsed and appears.
|
|
60
|
-
*/
|
|
61
|
-
minZoomLevel: PropTypes.number,
|
|
62
|
-
/**
|
|
63
|
-
* The maximum zoom level at which the layer gets parsed and appears.
|
|
64
|
-
*/
|
|
65
|
-
maxZoomLevel: PropTypes.number,
|
|
66
|
-
/**
|
|
67
|
-
* Customizable style attributes
|
|
68
|
-
*/
|
|
69
|
-
style: PropTypes.oneOfType([LineLayerStyleProp, PropTypes.arrayOf(LineLayerStyleProp)])
|
|
70
|
-
});
|
|
71
22
|
_defineProperty(LineLayer, "defaultProps", {
|
|
72
23
|
sourceID: MapboxGL.StyleSource.DefaultSourceID
|
|
73
24
|
});
|
|
74
|
-
const RCTMGLLineLayer = requireNativeComponent(NATIVE_MODULE_NAME
|
|
75
|
-
nativeOnly: {
|
|
76
|
-
reactStyle: true
|
|
77
|
-
}
|
|
78
|
-
});
|
|
25
|
+
const RCTMGLLineLayer = requireNativeComponent(NATIVE_MODULE_NAME);
|
|
79
26
|
export default LineLayer;
|
|
80
27
|
//# sourceMappingURL=LineLayer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","NativeModules","requireNativeComponent","AbstractLayer","MapboxGL","MGLModule","NATIVE_MODULE_NAME","LineLayer","render","props","baseProps","sourceLayerID","setNativeLayer","sourceID","StyleSource","DefaultSourceID","RCTMGLLineLayer"],"sourceRoot":"../../javascript","sources":["LineLayer.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,sBAAsB,QAAQ,cAAc;AAKpE,OAAOC,aAAa,MAAM,iBAAiB;AAE3C,MAAMC,QAAQ,GAAGH,aAAa,CAACI,SAAS;AAExC,OAAO,MAAMC,kBAAkB,GAAG,iBAAiB;AA4DnD;AACA;AACA;AACA,MAAMC,SAAS,SAASJ,aAAa,CAAyB;EAK5DK,MAAM,GAAG;IACP,MAAMC,KAAK,GAAG;MACZ,GAAG,IAAI,CAACC,SAAS;MACjBC,aAAa,EAAE,IAAI,CAACF,KAAK,CAACE;IAC5B,CAAC;IACD,oBAAO,oBAAC,eAAe;MAAC,GAAG,EAAE,IAAI,CAACC;IAAe,GAAKH,KAAK,EAAI;EACjE;AACF;AAAC,gBAZKF,SAAS,kBACS;EACpBM,QAAQ,EAAET,QAAQ,CAACU,WAAW,CAACC;AACjC,CAAC;AAWH,MAAMC,eAAe,GACnBd,sBAAsB,CAAkBI,kBAAkB,CAAC;AAE7D,eAAeC,SAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["VisibilityEnum","FillTranslateAnchorEnum","LineCapEnum","LineJoinEnum","LineTranslateAnchorEnum","SymbolPlacementEnum","SymbolZOrderEnum","IconRotationAlignmentEnum","IconTextFitEnum","IconAnchorEnum","IconPitchAlignmentEnum","TextPitchAlignmentEnum","TextRotationAlignmentEnum","TextJustifyEnum","TextVariableAnchorEnum","TextAnchorEnum","TextWritingModeEnum","TextTransformEnum","IconTranslateAnchorEnum","TextTranslateAnchorEnum","CircleTranslateAnchorEnum","CirclePitchScaleEnum","CirclePitchAlignmentEnum","FillExtrusionTranslateAnchorEnum","RasterResamplingEnum","HillshadeIlluminationAnchorEnum","SkyTypeEnum","AnchorEnum"],"sourceRoot":"../../javascript","sources":["MapboxStyles.d.ts"],"mappings":"AAAA;AAUsC;
|
|
1
|
+
{"version":3,"names":["VisibilityEnum","FillTranslateAnchorEnum","LineCapEnum","LineJoinEnum","LineTranslateAnchorEnum","SymbolPlacementEnum","SymbolZOrderEnum","IconRotationAlignmentEnum","IconTextFitEnum","IconAnchorEnum","IconPitchAlignmentEnum","TextPitchAlignmentEnum","TextRotationAlignmentEnum","TextJustifyEnum","TextVariableAnchorEnum","TextAnchorEnum","TextWritingModeEnum","TextTransformEnum","IconTranslateAnchorEnum","TextTranslateAnchorEnum","CircleTranslateAnchorEnum","CirclePitchScaleEnum","CirclePitchAlignmentEnum","FillExtrusionTranslateAnchorEnum","RasterResamplingEnum","HillshadeIlluminationAnchorEnum","SkyTypeEnum","AnchorEnum"],"sourceRoot":"../../javascript","sources":["MapboxStyles.d.ts"],"mappings":"AAAA;AAUsC;AAuHtC;AAAA,IAKKA,cAAc;AAAA,WAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;AAAA,GAAdA,cAAc,KAAdA,cAAc;AAAA,IAOdC,uBAAuB;AAAA,WAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;AAAA,GAAvBA,uBAAuB,KAAvBA,uBAAuB;AAAA,IAOvBC,WAAW;AAAA,WAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;AAAA,GAAXA,WAAW,KAAXA,WAAW;AAAA,IASXC,YAAY;AAAA,WAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;AAAA,GAAZA,YAAY,KAAZA,YAAY;AAAA,IASZC,uBAAuB;AAAA,WAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;AAAA,GAAvBA,uBAAuB,KAAvBA,uBAAuB;AAAA,IAOvBC,mBAAmB;AAAA,WAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;AAAA,GAAnBA,mBAAmB,KAAnBA,mBAAmB;AAAA,IASnBC,gBAAgB;AAAA,WAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;AAAA,GAAhBA,gBAAgB,KAAhBA,gBAAgB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oB,KAApBA,oBAAoB;AAAA,IAOpBC,+BAA+B;AAAA,WAA/BA,+BAA+B;EAA/BA,+BAA+B;EAA/BA,+BAA+B;AAAA,GAA/BA,+BAA+B,KAA/BA,+BAA+B;AAAA,IAO/BC,WAAW;AAAA,WAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;AAAA,GAAXA,WAAW,KAAXA,WAAW;AAAA,IAOXC,UAAU;AAAA,WAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;AAAA,GAAVA,UAAU,KAAVA,UAAU;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Image","processColor","BridgeValue","getStyleType","transformStyle","style","nativeStyle","styleProps","Object","keys","styleProp","styleType","rawStyle","color","undefined","console","error","resolveAssetSource","bridgeValue","styletype","stylevalue","toJSON"],"sourceRoot":"../../javascript","sources":["StyleValue.ts"],"mappings":"AAAA,SAASA,KAAK,EAAEC,YAAY,QAAQ,cAAc;AAElD,OAAOC,WAAW,MAGX,eAAe;AAEtB,SAASC,YAAY,QAAQ,YAAY;AAOzC,OAAO,SAASC,cAAc,CAC5BC,
|
|
1
|
+
{"version":3,"names":["Image","processColor","BridgeValue","getStyleType","transformStyle","style","nativeStyle","styleProps","Object","keys","styleProp","styleType","rawStyle","color","undefined","console","error","resolveAssetSource","bridgeValue","styletype","stylevalue","toJSON"],"sourceRoot":"../../javascript","sources":["StyleValue.ts"],"mappings":"AAAA,SAASA,KAAK,EAAEC,YAAY,QAAQ,cAAc;AAElD,OAAOC,WAAW,MAGX,eAAe;AAEtB,SAASC,YAAY,QAAQ,YAAY;AAOzC,OAAO,SAASC,cAAc,CAC5BC,KAAqC,EACM;EAC3C,IAAI,CAACA,KAAK,EAAE;IACV;EACF;EAEA,MAAMC,WAA0C,GAAG,CAAC,CAAC;EACrD,MAAMC,UAAU,GAAGC,MAAM,CAACC,IAAI,CAACJ,KAAK,CAA8B;EAClE,KAAK,MAAMK,SAAS,IAAIH,UAAU,EAAE;IAClC,MAAMI,SAAS,GAAGR,YAAY,CAACO,SAAS,CAAC;IACzC,IAAIE,QAAkC,GAAGP,KAAK,CAACK,SAAS,CAAC;IAEzD,IAAIC,SAAS,KAAK,OAAO,IAAI,OAAOC,QAAQ,KAAK,QAAQ,EAAE;MACzD,MAAMC,KAAK,GAAGZ,YAAY,CAACW,QAAQ,CAAC;MACpC,IAAIC,KAAK,KAAK,IAAI,IAAIA,KAAK,KAAKC,SAAS,IAAI,OAAOD,KAAK,KAAK,QAAQ,EAAE;QACtEE,OAAO,CAACC,KAAK,CAAE,kCAAiCJ,QAAS,YAAW,CAAC;QACrEA,QAAQ,GAAG,QAAQ;MACrB,CAAC,MAAM;QACLA,QAAQ,GAAGC,KAAK;MAClB;IACF,CAAC,MAAM,IAAIF,SAAS,KAAK,OAAO,IAAI,OAAOC,QAAQ,KAAK,QAAQ,EAAE;MAChEA,QAAQ,GACLZ,KAAK,CAACiB,kBAAkB,CAACL,QAAQ,CAAC,IAAgC,CAAC,CAAC;IACzE;IAEA,IAAIA,QAAQ,KAAKE,SAAS,EAAE;MAC1B,MAAMI,WAAW,GAAG,IAAIhB,WAAW,CAACU,QAAQ,CAAC;MAC7CN,WAAW,CAACI,SAAS,CAAC,GAAG;QACvBS,SAAS,EAAER,SAAS;QACpBS,UAAU,EAAEF,WAAW,CAACG,MAAM;MAChC,CAAC;IACH;EACF;EAEA,OAAOf,WAAW;AACpB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { NativeMethods, processColor } from 'react-native';
|
|
3
|
-
import { AllLayerStyleProps,
|
|
3
|
+
import { AllLayerStyleProps, FilterExpression } from '../utils/MapboxStyles';
|
|
4
4
|
declare type PropsBase = {
|
|
5
5
|
id: string;
|
|
6
6
|
sourceID?: string;
|
|
@@ -9,15 +9,15 @@ declare type PropsBase = {
|
|
|
9
9
|
aboveLayerID?: string;
|
|
10
10
|
belowLayerID?: string;
|
|
11
11
|
layerIndex?: number;
|
|
12
|
-
filter?:
|
|
13
|
-
style
|
|
12
|
+
filter?: FilterExpression;
|
|
13
|
+
style?: AllLayerStyleProps;
|
|
14
14
|
};
|
|
15
15
|
declare class AbstractLayer<PropsType extends PropsBase, NativePropsType> extends React.PureComponent<PropsType> {
|
|
16
16
|
get baseProps(): PropsType;
|
|
17
17
|
nativeLayer: (React.Component<NativePropsType> & Readonly<NativeMethods>) | undefined;
|
|
18
18
|
setNativeLayer: (instance: React.Component<NativePropsType> & Readonly<NativeMethods>) => void;
|
|
19
19
|
getStyleTypeFormatter(styleType: string): typeof processColor | undefined;
|
|
20
|
-
getStyle(style: AllLayerStyleProps): {
|
|
20
|
+
getStyle(style: AllLayerStyleProps | undefined): {
|
|
21
21
|
[key: string]: import("../utils/StyleValue").StyleValue;
|
|
22
22
|
} | undefined;
|
|
23
23
|
setNativeProps(props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractLayer.d.ts","sourceRoot":"","sources":["../../../javascript/components/AbstractLayer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG3D,OAAO,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"AbstractLayer.d.ts","sourceRoot":"","sources":["../../../javascript/components/AbstractLayer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG3D,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG7E,aAAK,SAAS,GAAG;IACf,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B,CAAC;AAEF,cAAM,aAAa,CACjB,SAAS,SAAS,SAAS,EAC3B,eAAe,CACf,SAAQ,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC;IACtC,IAAI,SAAS,IAAI,SAAS,CAczB;IAED,WAAW,EACP,CAAC,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC,GAC5D,SAAS,CAAa;IAE1B,cAAc,aACF,MAAM,SAAS,CAAC,eAAe,CAAC,GAAG,SAAS,aAAa,CAAC,UAGpE;IAEF,qBAAqB,CAAC,SAAS,EAAE,MAAM;IAOvC,QAAQ,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS;;;IAI9C,cAAc,CAAC,KAAK,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE;CAYjD;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FilterExpression, LineLayerStyleProps } from '../utils/MapboxStyles';
|
|
3
|
+
import { StyleValue } from '../utils/StyleValue';
|
|
4
|
+
import AbstractLayer from './AbstractLayer';
|
|
5
|
+
export declare const NATIVE_MODULE_NAME = "RCTMGLLineLayer";
|
|
6
|
+
export declare type Props = {
|
|
7
|
+
/**
|
|
8
|
+
* A string that uniquely identifies the source in the style to which it is added.
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* The source from which to obtain the data to style.
|
|
13
|
+
* If the source has not yet been added to the current style, the behavior is undefined.
|
|
14
|
+
* Inferred from parent source only if the layer is a direct child to it.
|
|
15
|
+
*/
|
|
16
|
+
sourceID?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style.
|
|
19
|
+
*/
|
|
20
|
+
sourceLayerID?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Inserts a layer above aboveLayerID.
|
|
23
|
+
*/
|
|
24
|
+
aboveLayerID?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Inserts a layer below belowLayerID
|
|
27
|
+
*/
|
|
28
|
+
belowLayerID?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Inserts a layer at a specified index
|
|
31
|
+
*/
|
|
32
|
+
layerIndex?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Filter only the features in the source layer that satisfy a condition that you define
|
|
35
|
+
*/
|
|
36
|
+
filter?: FilterExpression;
|
|
37
|
+
/**
|
|
38
|
+
* The minimum zoom level at which the layer gets parsed and appears.
|
|
39
|
+
*/
|
|
40
|
+
minZoomLevel?: number;
|
|
41
|
+
/**
|
|
42
|
+
* The maximum zoom level at which the layer gets parsed and appears.
|
|
43
|
+
*/
|
|
44
|
+
maxZoomLevel?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Customizable style attributes
|
|
47
|
+
*/
|
|
48
|
+
style?: LineLayerStyleProps;
|
|
49
|
+
};
|
|
50
|
+
declare type NativeTypeProps = Omit<Props, 'style'> & {
|
|
51
|
+
reactStyle?: {
|
|
52
|
+
[key: string]: StyleValue;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* LineLayer is a style layer that renders one or more stroked polylines on the map.
|
|
57
|
+
*/
|
|
58
|
+
declare class LineLayer extends AbstractLayer<Props, NativeTypeProps> {
|
|
59
|
+
static defaultProps: {
|
|
60
|
+
sourceID: any;
|
|
61
|
+
};
|
|
62
|
+
render(): JSX.Element;
|
|
63
|
+
}
|
|
64
|
+
export default LineLayer;
|
|
65
|
+
//# sourceMappingURL=LineLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LineLayer.d.ts","sourceRoot":"","sources":["../../../javascript/components/LineLayer.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAI5C,eAAO,MAAM,kBAAkB,oBAAoB,CAAC;AAEpD,oBAAY,KAAK,GAAG;IAClB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC;CAC7B,CAAC;AAEF,aAAK,eAAe,GAAG,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG;IAC5C,UAAU,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,CAAC;CAC5C,CAAC;AAEF;;GAEG;AACH,cAAM,SAAU,SAAQ,aAAa,CAAC,KAAK,EAAE,eAAe,CAAC;IAC3D,MAAM,CAAC,YAAY;;MAEjB;IAEF,MAAM;CAOP;AAKD,eAAe,SAAS,CAAC"}
|
|
@@ -42,7 +42,7 @@ export declare type Props = {
|
|
|
42
42
|
* The maximum zoom level at which the layer gets parsed and appears.
|
|
43
43
|
*/
|
|
44
44
|
maxZoomLevel?: number;
|
|
45
|
-
style
|
|
45
|
+
style?: SymbolLayerStyleProps;
|
|
46
46
|
children?: JSX.Element | JSX.Element[];
|
|
47
47
|
};
|
|
48
48
|
declare type NativeTypeProps = Omit<Props, 'style'> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SymbolLayer.d.ts","sourceRoot":"","sources":["../../../javascript/components/SymbolLayer.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,UAAU,EAAE,KAAK,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAI5C,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AAEtD,oBAAY,KAAK,GAAG;IAClB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IAEpB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,KAAK,EAAE,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"SymbolLayer.d.ts","sourceRoot":"","sources":["../../../javascript/components/SymbolLayer.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,UAAU,EAAE,KAAK,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAI5C,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AAEtD,oBAAY,KAAK,GAAG;IAClB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IAEpB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAE9B,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACxC,CAAC;AAEF,aAAK,eAAe,GAAG,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG;IAC5C,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,CAAC;CAC5C,CAAC;AAKF;;GAEG;AACH,qBAAa,WAAY,SAAQ,aAAa,CAAC,KAAK,EAAE,eAAe,CAAC;IACpE,MAAM,CAAC,YAAY;;MAEjB;IAEF,eAAe;IAgBf,MAAM;CAaP"}
|
|
@@ -4,7 +4,7 @@ export declare type StyleValue = {
|
|
|
4
4
|
styletype: string;
|
|
5
5
|
stylevalue: StyleValueJSON;
|
|
6
6
|
};
|
|
7
|
-
export declare function transformStyle(style: AllLayerStyleProps): undefined | {
|
|
7
|
+
export declare function transformStyle(style: AllLayerStyleProps | undefined): undefined | {
|
|
8
8
|
[key: string]: StyleValue;
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=StyleValue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyleValue.d.ts","sourceRoot":"","sources":["../../../javascript/utils/StyleValue.ts"],"names":[],"mappings":"AAEA,OAAoB,EAElB,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAGpD,oBAAY,UAAU,GAAG;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,cAAc,CAAC;CAC5B,CAAC;AAEF,wBAAgB,cAAc,CAC5B,KAAK,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"StyleValue.d.ts","sourceRoot":"","sources":["../../../javascript/utils/StyleValue.ts"],"names":[],"mappings":"AAEA,OAAoB,EAElB,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAGpD,oBAAY,UAAU,GAAG;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,cAAc,CAAC;CAC5B,CAAC;AAEF,wBAAgB,cAAc,CAC5B,KAAK,EAAE,kBAAkB,GAAG,SAAS,GACpC,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE,CAkC3C"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rnmapbox/maps",
|
|
3
3
|
"description": "A Mapbox react native module for creating custom maps",
|
|
4
|
-
"version": "10.0.0-beta.
|
|
4
|
+
"version": "10.0.0-beta.54",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -125,6 +125,7 @@
|
|
|
125
125
|
"lib",
|
|
126
126
|
"plugin",
|
|
127
127
|
"assets",
|
|
128
|
+
"app.plugin.js",
|
|
128
129
|
"index.d.ts",
|
|
129
130
|
"rnmapbox-maps.podspec",
|
|
130
131
|
"ios",
|
|
@@ -1,94 +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 { LineLayerStyleProp } from '../utils/styleMap';
|
|
7
|
-
|
|
8
|
-
import AbstractLayer from './AbstractLayer';
|
|
9
|
-
|
|
10
|
-
const MapboxGL = NativeModules.MGLModule;
|
|
11
|
-
|
|
12
|
-
export const NATIVE_MODULE_NAME = 'RCTMGLLineLayer';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* LineLayer is a style layer that renders one or more stroked polylines on the map.
|
|
16
|
-
*/
|
|
17
|
-
class LineLayer 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
|
-
LineLayerStyleProp,
|
|
73
|
-
PropTypes.arrayOf(LineLayerStyleProp),
|
|
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 <RCTMGLLineLayer ref={this.setNativeLayer} {...props} />;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
const RCTMGLLineLayer = requireNativeComponent(NATIVE_MODULE_NAME, LineLayer, {
|
|
91
|
-
nativeOnly: { reactStyle: true },
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
export default LineLayer;
|