@maplibre/maplibre-gl-style-spec
Advanced tools
Comparing version 22.0.0 to 22.0.1
{ | ||
"name": "@maplibre/maplibre-gl-style-spec", | ||
"description": "a specification for maplibre styles", | ||
"version": "22.0.0", | ||
"version": "22.0.1", | ||
"author": "MapLibre", | ||
@@ -69,13 +69,13 @@ "keywords": [ | ||
"@rollup/plugin-typescript": "^12.1.1", | ||
"@stylistic/eslint-plugin-ts": "^2.10.1", | ||
"@stylistic/eslint-plugin-ts": "^2.11.0", | ||
"@types/eslint": "^9.6.1", | ||
"@types/geojson": "^7946.0.14", | ||
"@types/jest": "^29.5.14", | ||
"@types/node": "^22.9.0", | ||
"@typescript-eslint/eslint-plugin": "^8.13.0", | ||
"@typescript-eslint/parser": "^8.13.0", | ||
"@types/node": "^22.9.3", | ||
"@typescript-eslint/eslint-plugin": "^8.15.0", | ||
"@typescript-eslint/parser": "^8.15.0", | ||
"dts-bundle-generator": "^9.5.1", | ||
"eslint": "^9.14.0", | ||
"eslint": "^9.15.0", | ||
"eslint-plugin-jest": "^28.9.0", | ||
"eslint-plugin-jsdoc": "^50.4.3", | ||
"eslint-plugin-jsdoc": "^50.5.0", | ||
"glob": "^11.0.0", | ||
@@ -86,3 +86,3 @@ "globals": "^15.12.0", | ||
"jest-environment-jsdom": "^29.7.0", | ||
"rollup": "^4.25.0", | ||
"rollup": "^4.27.4", | ||
"rollup-plugin-preserve-shebang": "^1.0.1", | ||
@@ -89,0 +89,0 @@ "semver": "^7.6.3", |
@@ -174,2 +174,26 @@ import {featureFilter, isExpressionFilter} from '.'; | ||
test('expression, geomtery-type point', () => { | ||
const withinFilter = featureFilter(['==', ['geometry-type'], 'Point']); | ||
expect(withinFilter.needGeometry).toBe(true); | ||
const canonical = {z: 3, x: 3, y: 3} as ICanonicalTileID; | ||
const featureInTile = { | ||
type: 1, | ||
geometry: [[{x: 0, y: 0}]], | ||
properties: {} | ||
} as Feature; | ||
expect(withinFilter.filter({zoom: 3}, featureInTile, canonical)).toBe(true); | ||
}); | ||
test('expression, geomtery-type multipoint', () => { | ||
const withinFilter = featureFilter(['==', ['geometry-type'], 'MultiPoint']); | ||
expect(withinFilter.needGeometry).toBe(true); | ||
const canonical = {z: 3, x: 3, y: 3} as ICanonicalTileID; | ||
const featureInTile = { | ||
type: 1, | ||
geometry: [[{x: 0, y: 0}], [{x: 1, y: 1}]], | ||
properties: {} | ||
} as Feature; | ||
expect(withinFilter.filter({zoom: 3}, featureInTile, canonical)).toBe(true); | ||
}); | ||
legacyFilterTests(featureFilter); | ||
@@ -176,0 +200,0 @@ |
@@ -106,3 +106,3 @@ import {createExpression} from '../expression'; | ||
if (!Array.isArray(filter)) return false; | ||
if (filter[0] === 'within' || filter[0] === 'distance') return true; | ||
if (filter[0] === 'within' || filter[0] === 'distance' || filter[0] === 'geometry-type') return true; | ||
for (let index = 1; index < filter.length; index++) { | ||
@@ -109,0 +109,0 @@ if (geometryNeeded(filter[index])) return true; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9232808
103906