Skip to content

Commit

Permalink
chore: reinsert ol radio button level layers for sandbox topic
Browse files Browse the repository at this point in the history
  • Loading branch information
danji90 committed Feb 13, 2025
1 parent 7f06b40 commit 3a2ee6a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
25 changes: 16 additions & 9 deletions src/config/ch.sbb.netzkarte.sandbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,24 @@ export const poiLayer = new MapboxStyleLayer({
style: "temp_entwicklungsstyle",
});

export const sandboxGeschosseLayer = geschosseLayer.clone();
export const sandboxGeschosseLayer = geschosseLayer.clone({
properties: {
hideInLayerTree: false,
},
});

sandboxGeschosseLayer.children = geschosseLayer.children.map((layer) => {
return layer.clone({
mapboxLayer: sandboxDataLayer,
properties: {
parent: sandboxGeschosseLayer,
hideInLayerTree: true,
},
sandboxGeschosseLayer.children = geschosseLayer.children
.slice(2, 12) // only show levels from -4 to 4
.map((layer) => {
return layer.clone({
mapboxLayer: sandboxDataLayer,
group: "ch.sbb.geschosse-layer",
properties: {
parent: sandboxGeschosseLayer,
hideInLayerTree: false,
},
});
});
});

export default [
sandboxDataLayer,
Expand Down
5 changes: 1 addition & 4 deletions src/config/topics.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,7 @@ const sandbox = {
key: "ch.sbb.netzkarte.sandbox",
layers: sandboxLayers,
projection: "EPSG:3857",
elements: {
...defaultElements,
floorSwitcher: true,
},
elements: defaultElements,
layerInfoComponent: "SandboxTopicInfo",
searches: defaultSearches,
};
Expand Down

0 comments on commit 3a2ee6a

Please sign in to comment.