@nativescript-community/ui-mapbox 6.2.15 → 6.2.20
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/CHANGELOG.md +13 -93
- package/README.md +72 -12
- package/blueprint.md +922 -0
- package/common.d.ts +199 -0
- package/common.js +44 -4
- package/expression/expression-parser.ios.js +1 -1
- package/geo.utils.d.ts +13 -0
- package/geo.utils.js +14 -1
- package/index.android.d.ts +332 -1
- package/index.android.js +452 -21
- package/index.ios.d.ts +179 -0
- package/index.ios.js +356 -269
- package/layers/layer-factory.android.js +2 -1
- package/layers/layer-factory.ios.js +4 -1
- package/layers/parser/property-parser.android.js +1 -0
- package/layers/parser/property-parser.ios.js +3 -3
- package/package.json +3 -3
- package/platforms/android/ui_mapbox.aar +0 -0
|
@@ -58,12 +58,13 @@ export class Layer {
|
|
|
58
58
|
if (this.instance instanceof com.mapbox.mapboxsdk.style.layers.BackgroundLayer) {
|
|
59
59
|
return "background";
|
|
60
60
|
}
|
|
61
|
+
// there is no sky layer in the Android Mapbox SDK
|
|
61
62
|
return null;
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
export class LayerFactory {
|
|
65
66
|
static async createLayer(style, source) {
|
|
66
|
-
const layerProperties = this.parseProperties(style.type, Object.assign(style.paint || {}, style.layout || {}));
|
|
67
|
+
const layerProperties = this.parseProperties(style.type, Object.assign(style.paint || {}, style.layout || {})); // TODO: handle defaults
|
|
67
68
|
const sourceId = source.getId();
|
|
68
69
|
let nativeLayer;
|
|
69
70
|
switch (style.type) {
|
|
@@ -31,7 +31,7 @@ export class LayerFactory {
|
|
|
31
31
|
if (style['source-layer']) {
|
|
32
32
|
nativeLayer.sourceLayerIdentifier = style['source-layer'];
|
|
33
33
|
}
|
|
34
|
-
const layerProperties = this.parseProperties(style.type, Object.assign(style.paint || {}, style.layout || {}));
|
|
34
|
+
const layerProperties = this.parseProperties(style.type, Object.assign(style.paint || {}, style.layout || {})); // TODO: handle defaults
|
|
35
35
|
for (const propKey in layerProperties) {
|
|
36
36
|
if (Object.prototype.hasOwnProperty.call(layerProperties, propKey)) {
|
|
37
37
|
nativeLayer[propKey] = layerProperties[propKey];
|
|
@@ -77,6 +77,7 @@ export class Layer {
|
|
|
77
77
|
if (this.instance instanceof MGLBackgroundStyleLayer) {
|
|
78
78
|
return "background";
|
|
79
79
|
}
|
|
80
|
+
// there is no sky layer in the Mapbox iOS SDK
|
|
80
81
|
return null;
|
|
81
82
|
}
|
|
82
83
|
visibility() {
|
|
@@ -93,6 +94,8 @@ export class Layer {
|
|
|
93
94
|
}
|
|
94
95
|
setFilter(filter) {
|
|
95
96
|
if (this.instance instanceof MGLVectorStyleLayer) {
|
|
97
|
+
// MGLVectorStyleLayer is the base type of many layer types. Predicates only supported on vector style layers.
|
|
98
|
+
// See https://docs.mapbox.com/ios/maps/api/6.3.0/Classes/MGLVectorStyleLayer.html
|
|
96
99
|
this.instance.predicate = ExpressionParser.parseJson(filter);
|
|
97
100
|
}
|
|
98
101
|
else {
|
|
@@ -47,10 +47,10 @@ function transformValue(key, value) {
|
|
|
47
47
|
switch (key) {
|
|
48
48
|
case 'raster-resampling':
|
|
49
49
|
if (value === 'linear') {
|
|
50
|
-
return 0
|
|
50
|
+
return 0 /* MGLRasterResamplingMode.Linear */;
|
|
51
51
|
}
|
|
52
52
|
else if (value === 'nearest') {
|
|
53
|
-
return 1
|
|
53
|
+
return 1 /* MGLRasterResamplingMode.Nearest */;
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
56
|
return value;
|
|
@@ -83,7 +83,7 @@ export class PropertyParser {
|
|
|
83
83
|
if (!nValue) {
|
|
84
84
|
return null;
|
|
85
85
|
}
|
|
86
|
-
if (nValue.expressionType === 0) {
|
|
86
|
+
if (nValue.expressionType === 0 /* NSExpressionType.ConstantValueExpressionType */) {
|
|
87
87
|
if (nValue.constantValue instanceof UIColor) {
|
|
88
88
|
return Color.fromIosColor(nValue.constantValue);
|
|
89
89
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nativescript-community/ui-mapbox",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.20",
|
|
4
4
|
"description": "Interactive, thoroughly customizable maps powered by vector tiles and OpenGL.",
|
|
5
5
|
"main": "index",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"readmeFilename": "README.md",
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@nativescript-community/perms": "^2.
|
|
55
|
+
"@nativescript-community/perms": "^2.3.0"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "b8447280a87a4333e0a2a64adab0153e3dff4bf6"
|
|
58
58
|
}
|
|
Binary file
|