Skip to content

Commit

Permalink
refactor(example): add all layers in vector tiles examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
gchoqueux committed Nov 5, 2019
1 parent 9a5580b commit b3b900b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
8 changes: 2 additions & 6 deletions examples/vector_tile_raster_2d.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,7 @@
style.layers.forEach(function(layer) {
if (layer.type === 'background') {
backgroundLayer = layer;
} else if (['fill', 'line'].indexOf(layer.type) >= 0 &&
['landcover', 'water', 'boundary', 'transportation', 'park'].indexOf(layer['source-layer']) >= 0 &&
layer.id.indexOf('bridge') < 0 &&
layer.id.indexOf('tunnel') < 0 &&
layer.id.indexOf('admin_sub') < 0) {
} else if (['fill', 'line'].includes(layer.type)) {
supportedLayers.push(layer);
}
});
Expand All @@ -86,7 +82,7 @@
},
zoom: {
min: 2,
max: 14,
max: 16,
},
tileMatrixSet: 'PM',
projection: 'EPSG:3857',
Expand Down
6 changes: 1 addition & 5 deletions examples/vector_tile_raster_3d.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@
style.layers.forEach(function(layer) {
if (layer.type === 'background') {
backgroundLayer = layer;
} else if (['fill', 'line'].indexOf(layer.type) >= 0 &&
['landcover', 'water', 'boundary', 'transportation', 'park'].indexOf(layer['source-layer']) >= 0 &&
layer.id.indexOf('bridge') < 0 &&
layer.id.indexOf('tunnel') < 0 &&
layer.id.indexOf('admin_sub') < 0) {
} else if (['fill', 'line'].includes(layer.type)) {
supportedLayers.push(layer);
}
});
Expand Down

0 comments on commit b3b900b

Please sign in to comment.