Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6b0e287

Browse files
committed
fix(MVTParser): supp use of layer.style.zoom in parser
1 parent d947233 commit 6b0e287

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/Parser/VectorTileParser.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,10 @@ function readPBF(file, options) {
148148
for (let i = vectorTileLayer.length - 1; i >= 0; i--) {
149149
const vtFeature = vectorTileLayer.feature(i);
150150
vtFeature.tileNumbers = { x, y: options.extent.row, z };
151+
// Find layers where this vtFeature is used
151152
const layers = options.in.layers[vtLayerName]
152-
.filter(l => l.filterExpression.filter({ zoom: z }, vtFeature) && z >= l.zoom.min && z < l.zoom.max);
153+
.filter(l => l.filterExpression.filter({ zoom: z }, vtFeature));
154+
153155
let feature;
154156

155157
for (const layer of layers) {

src/Source/VectorTilesSource.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,6 @@ class VectorTilesSource extends TMSSource {
127127
id: layer.id,
128128
order,
129129
filterExpression: featureFilter(layer.filter),
130-
zoom: {
131-
min: layer.minzoom || 0,
132-
max: layer.maxzoom || 24,
133-
},
134130
});
135131
}
136132
});

0 commit comments

Comments
 (0)