@mapbox/mapbox-gl-style-spec 13.23.0-beta.1 → 13.23.1
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 +7 -1
- package/dist/index.cjs +27 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +27 -27
- package/dist/index.es.js.map +1 -1
- package/expression/definitions/coalesce.js +7 -5
- package/expression/types/formatted.js +2 -1
- package/feature_filter/index.js +2 -1
- package/package.json +1 -1
- package/reference/v8.json +1 -1
|
@@ -54,19 +54,21 @@ class Coalesce implements Expression {
|
|
|
54
54
|
evaluate(ctx: EvaluationContext) {
|
|
55
55
|
let result = null;
|
|
56
56
|
let argCount = 0;
|
|
57
|
-
let
|
|
57
|
+
let firstImage;
|
|
58
58
|
for (const arg of this.args) {
|
|
59
59
|
argCount++;
|
|
60
60
|
result = arg.evaluate(ctx);
|
|
61
61
|
// we need to keep track of the first requested image in a coalesce statement
|
|
62
|
-
// if coalesce can't find a valid image, we return the first image
|
|
62
|
+
// if coalesce can't find a valid image, we return the first image so styleimagemissing can fire
|
|
63
63
|
if (result && result instanceof ResolvedImage && !result.available) {
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
// set to first image
|
|
65
|
+
if (!firstImage) {
|
|
66
|
+
firstImage = result;
|
|
66
67
|
}
|
|
67
68
|
result = null;
|
|
69
|
+
// if we reach the end, return the first image
|
|
68
70
|
if (argCount === this.args.length) {
|
|
69
|
-
|
|
71
|
+
return firstImage;
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
74
|
|
|
@@ -10,7 +10,8 @@ export class FormattedSection {
|
|
|
10
10
|
textColor: Color | null;
|
|
11
11
|
|
|
12
12
|
constructor(text: string, image: ResolvedImage | null, scale: number | null, fontStack: string | null, textColor: Color | null) {
|
|
13
|
-
|
|
13
|
+
// combine characters so that diacritic marks are not separate code points
|
|
14
|
+
this.text = text.normalize ? text.normalize() : text;
|
|
14
15
|
this.image = image;
|
|
15
16
|
this.scale = scale;
|
|
16
17
|
this.fontStack = fontStack;
|
package/feature_filter/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import {createExpression} from '../expression/index.js';
|
|
4
4
|
import {isFeatureConstant} from '../expression/is_constant.js';
|
|
5
|
+
import {deepUnbundle} from '../util/unbundle_jsonlint.js';
|
|
5
6
|
import latest from '../reference/latest.js';
|
|
6
7
|
import type {GlobalProperties, Feature} from '../expression/index.js';
|
|
7
8
|
import type {CanonicalTileID} from '../../source/tile_id.js';
|
|
@@ -133,7 +134,7 @@ function extractStaticFilter(filter: any): any {
|
|
|
133
134
|
}
|
|
134
135
|
|
|
135
136
|
// Shallow copy so we can replace expressions in-place
|
|
136
|
-
let result = filter
|
|
137
|
+
let result = deepUnbundle(filter);
|
|
137
138
|
|
|
138
139
|
// 1. Union branches
|
|
139
140
|
unionDynamicBranches(result);
|
package/package.json
CHANGED
package/reference/v8.json
CHANGED
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
},
|
|
97
97
|
"projection": {
|
|
98
98
|
"type": "projection",
|
|
99
|
-
"doc": "The projection the map should be rendered in.
|
|
99
|
+
"doc": "The projection the map should be rendered in. Supported projections are Albers, Equal Earth, Equirectangular (WGS84), Lambert conformal conic, Mercator, Natural Earth, and Winkel Tripel. Terrain, fog, sky and CustomLayerInterface are not supported for projections other than mercator.",
|
|
100
100
|
"example": {
|
|
101
101
|
"name": "albers",
|
|
102
102
|
"center": [-154, 50],
|