tyles (again)

This commit is contained in:
Eric van der Vlist 2023-02-04 18:55:23 +01:00
parent 38a6230565
commit ad6feb6f15
1 changed files with 51 additions and 2 deletions

View File

@ -271,6 +271,49 @@ const styles = {
},
way: {
strokes: {
veryLowZoom: {
iwn: [
new Style({
stroke: new Stroke({
color: [255, 0, 0, 1],
width: 1,
}),
}),
],
nwn: [
new Style({
stroke: new Stroke({
color: [255, 0, 0, 1],
width: 1,
}),
}),
],
rwn: [
new Style({
stroke: new Stroke({
color: [255, 128, 0, 1],
width: 1,
}),
}),
],
lwn: [
new Style({
stroke: new Stroke({
color: [255, 255, 0, 1],
width: 1,
}),
}),
],
default: [
new Style({
stroke: new Stroke({
color: [255, 255, 0, 1],
width: 1,
lineDash: [10, 10],
}),
}),
],
},
lowZoom: {
iwn: [
new Style({
@ -301,6 +344,7 @@ const styles = {
stroke: new Stroke({
color: [255, 255, 0, 0.6],
width: 3,
lineDash: [10, 10],
}),
}),
],
@ -308,7 +352,7 @@ const styles = {
new Style({
stroke: new Stroke({
color: [255, 255, 0, 0.6],
width: 3,
width: 1,
lineDash: [10, 10],
}),
}),
@ -428,7 +472,12 @@ const styles = {
// isSelected: feature.get('isSelected') ?? false,
name: feature.get('name'),
network,
zoom: getZoomInteger() >= 12 ? 'highZoom' : 'lowZoom',
zoom:
getZoomInteger() >= 12
? 'highZoom'
: getZoomInteger() >= 8
? 'lowZoom'
: 'veryLowZoom',
};
},
getStyle: memoize((params: any) => {