Still playing with styles for ways

This commit is contained in:
Eric van der Vlist 2023-02-04 15:07:50 +01:00
parent adce285b0f
commit fcaa3b95a0
1 changed files with 44 additions and 31 deletions

View File

@ -275,7 +275,7 @@ const styles = {
iwn: [ iwn: [
new Style({ new Style({
stroke: new Stroke({ stroke: new Stroke({
color: [255, 0, 0, 0.8], color: [255, 0, 0, 0.6],
width: 3, width: 3,
}), }),
}), }),
@ -283,7 +283,7 @@ const styles = {
nwn: [ nwn: [
new Style({ new Style({
stroke: new Stroke({ stroke: new Stroke({
color: [255, 0, 0, 0.8], color: [255, 0, 0, 0.6],
width: 3, width: 3,
}), }),
}), }),
@ -291,7 +291,7 @@ const styles = {
rwn: [ rwn: [
new Style({ new Style({
stroke: new Stroke({ stroke: new Stroke({
color: [255, 128, 0, 0.8], color: [255, 128, 0, 0.6],
width: 3, width: 3,
}), }),
}), }),
@ -299,7 +299,7 @@ const styles = {
lwn: [ lwn: [
new Style({ new Style({
stroke: new Stroke({ stroke: new Stroke({
color: [255, 255, 0, 0.8], color: [255, 255, 0, 0.6],
width: 3, width: 3,
}), }),
}), }),
@ -307,7 +307,7 @@ const styles = {
default: [ default: [
new Style({ new Style({
stroke: new Stroke({ stroke: new Stroke({
color: [255, 255, 0, 0.8], color: [255, 255, 0, 0.6],
width: 3, width: 3,
lineDash: [10, 10], lineDash: [10, 10],
}), }),
@ -318,71 +318,84 @@ const styles = {
iwn: [ iwn: [
new Style({ new Style({
stroke: new Stroke({ stroke: new Stroke({
color: [255, 0, 0, 0.8], color: [255, 0, 0, 0.6],
width: 3, width: 7,
lineDash: [10, 10], // lineDash: [10, 10],
lineDashOffset: 10, // lineDashOffset: 10,
}), }),
}), }),
new Style({ new Style({
stroke: new Stroke({ stroke: new Stroke({
color: [255, 255, 255, 0.8], color: [255, 255, 255, 0.6],
width: 3, width: 3,
lineDash: [10, 10], // lineDash: [10, 10],
lineDashOffset: 0, // lineDashOffset: 0,
}), }),
}), }),
], ],
nwn: [ nwn: [
new Style({ new Style({
stroke: new Stroke({ stroke: new Stroke({
color: [255, 0, 0, 0.8], color: [255, 0, 0, 0.6],
width: 3, width: 7,
lineDash: [10, 10], // lineDash: [10, 10],
lineDashOffset: 10, // lineDashOffset: 10,
}), }),
}), }),
new Style({ new Style({
stroke: new Stroke({ stroke: new Stroke({
color: [255, 255, 255, 0.8], color: [255, 255, 255, 0.6],
width: 3, width: 3,
lineDash: [10, 10], // lineDash: [10, 10],
lineDashOffset: 0, // lineDashOffset: 0,
}), }),
}), }),
], ],
rwn: [ rwn: [
new Style({ new Style({
stroke: new Stroke({ stroke: new Stroke({
color: [255, 0, 0, 0.8], color: [255, 255, 0, 0.6],
width: 3, width: 7,
lineDash: [10, 10], // lineDash: [10, 10],
lineDashOffset: 10, // lineDashOffset: 10,
}), }),
}), }),
new Style({ new Style({
stroke: new Stroke({ stroke: new Stroke({
color: [255, 255, 0, 0.8], color: [255, 0, 0, 0.6],
width: 3, width: 3,
lineDash: [10, 10], // lineDash: [10, 10],
lineDashOffset: 0, // lineDashOffset: 0,
}), }),
}), }),
], ],
lwn: [ lwn: [
new Style({ new Style({
stroke: new Stroke({ stroke: new Stroke({
color: [255, 255, 0, 0.8], color: [0, 0, 255, 0.6],
width: 3, width: 3,
}), }),
}), }),
new Style({
stroke: new Stroke({
color: [255, 255, 0, 0.6],
width: 1,
}),
}),
], ],
default: [ default: [
new Style({ new Style({
stroke: new Stroke({ stroke: new Stroke({
color: [225, 220, 94, 0.8], color: [0, 0, 255, 0.6],
width: 3,
lineDash: [10, 10], lineDash: [10, 10],
width: 3,
}),
}),
new Style({
stroke: new Stroke({
color: [255, 255, 0, 0.6],
lineDash: [10, 10],
width: 1,
}), }),
}), }),
], ],
@ -405,10 +418,10 @@ const styles = {
if (getZoomInteger() < 7 && !['iwn'].includes(network)) { if (getZoomInteger() < 7 && !['iwn'].includes(network)) {
return null; return null;
} }
if (getZoomInteger() < 12 && !['iwn', 'nwn'].includes(network)) { if (getZoomInteger() < 11 && !['iwn', 'nwn'].includes(network)) {
return null; return null;
} }
if (getZoomInteger() < 14 && !['iwn', 'nwn', 'lwn'].includes(network)) { if (getZoomInteger() < 13 && !['iwn', 'nwn', 'lwn'].includes(network)) {
return null; return null;
} }
return { return {