diff --git a/src/style-spec/expression/definitions/within.js b/src/style-spec/expression/definitions/within.js index e6f790145af..4391d5b5173 100644 --- a/src/style-spec/expression/definitions/within.js +++ b/src/style-spec/expression/definitions/within.js @@ -244,7 +244,7 @@ class Within implements Expression { return new Within(geojson, geojson); } } - return context.error(`'within' expression requires valid geojson source that contains polygon geometry type.`); + return context.error(`'within' expression requires valid geojson object that contains polygon geometry type.`); } evaluate(ctx: EvaluationContext) { diff --git a/src/style-spec/reference/v8.json b/src/style-spec/reference/v8.json index 458e7d038a6..0b87c463a11 100644 --- a/src/style-spec/reference/v8.json +++ b/src/style-spec/reference/v8.json @@ -3455,7 +3455,7 @@ } }, "within": { - "doc": "Returns `true` if the feature being evaluated is inside the pre-defined geometry boundary, `false` otherwise. The arguments are required to be valid GeoJSON object which contains `Polygon` geometries. Currently only features with `Point` or `LineString` geometry types are supported.", + "doc": "Returns `true` if the feature being evaluated is inside the pre-defined geometry boundary, `false` otherwise. The expression has one argument which must be a valid GeoJSON Polygon/Multi-Polygon object. The expression only evaluates on `Point` or `LineString` feature. For `Point` feature, The expression will return false if any point of the feature is on the boundary or outside the boundary. For `LineString` feature, the expression will return false if the line is fully outside the boundary, or the line is partially intersecting the boundary, which means either part of the line is outside of the boundary, or end point of the line lies on the boundary.", "group": "Decision", "sdk-support": { "basic functionality": { diff --git a/src/symbol/symbol_layout.js b/src/symbol/symbol_layout.js index c0aa59e01ed..9dec812e28d 100644 --- a/src/symbol/symbol_layout.js +++ b/src/symbol/symbol_layout.js @@ -148,9 +148,9 @@ export function evaluateVariableOffset(anchor: TextAnchor, offset: [number, numb } export function performSymbolLayout(bucket: SymbolBucket, - glyphMap: {[string]: {[number]: ?StyleGlyph}}, - glyphPositions: {[string]: {[number]: GlyphPosition}}, - imageMap: {[string]: StyleImage}, + glyphMap: {[_: string]: {[number]: ?StyleGlyph}}, + glyphPositions: {[_: string]: {[number]: GlyphPosition}}, + imageMap: {[_: string]: StyleImage}, imagePositions: {[_: string]: ImagePosition}, showCollisionBoxes: boolean, canonical: CanonicalTileID) { diff --git a/test/expression.test.js b/test/expression.test.js index 47e955d0393..4465ca27886 100644 --- a/test/expression.test.js +++ b/test/expression.test.js @@ -29,7 +29,7 @@ function convertLines(lines, canonical, out) { } } -function getGeomtry(feature, geometry, canonical) { +function getGeometry(feature, geometry, canonical) { if (geometry.coordinates) { const coords = geometry.coordinates; const type = geometry.type; @@ -114,7 +114,7 @@ run('js', {ignores, tests}, (fixture) => { } if ('geometry' in input[1]) { if (canonical !== null) { - getGeomtry(feature, input[1].geometry, canonical); + getGeometry(feature, input[1].geometry, canonical); } else { feature.type = input[1].geometry.type; } diff --git a/test/integration/expression-tests/within/invalid-geojson/test.json b/test/integration/expression-tests/within/invalid-geojson/test.json index 5a6ccfa38fb..bd944da7d9f 100644 --- a/test/integration/expression-tests/within/invalid-geojson/test.json +++ b/test/integration/expression-tests/within/invalid-geojson/test.json @@ -44,7 +44,7 @@ "compiled": { "errors": [{ "key": "", - "error": "'within' expression requires valid geojson source that contains polygon geometry type." + "error": "'within' expression requires valid geojson object that contains polygon geometry type." }], "result": "error" }