From fcaa3b95a0e8259287c9cb0fcaf73cc413b65731 Mon Sep 17 00:00:00 2001 From: evlist Date: Sat, 4 Feb 2023 15:07:50 +0100 Subject: [PATCH] Still playing with styles for ways --- src/components/gpx/styles.ts | 75 +++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/src/components/gpx/styles.ts b/src/components/gpx/styles.ts index e33644a..a3a97db 100644 --- a/src/components/gpx/styles.ts +++ b/src/components/gpx/styles.ts @@ -275,7 +275,7 @@ const styles = { iwn: [ new Style({ stroke: new Stroke({ - color: [255, 0, 0, 0.8], + color: [255, 0, 0, 0.6], width: 3, }), }), @@ -283,7 +283,7 @@ const styles = { nwn: [ new Style({ stroke: new Stroke({ - color: [255, 0, 0, 0.8], + color: [255, 0, 0, 0.6], width: 3, }), }), @@ -291,7 +291,7 @@ const styles = { rwn: [ new Style({ stroke: new Stroke({ - color: [255, 128, 0, 0.8], + color: [255, 128, 0, 0.6], width: 3, }), }), @@ -299,7 +299,7 @@ const styles = { lwn: [ new Style({ stroke: new Stroke({ - color: [255, 255, 0, 0.8], + color: [255, 255, 0, 0.6], width: 3, }), }), @@ -307,7 +307,7 @@ const styles = { default: [ new Style({ stroke: new Stroke({ - color: [255, 255, 0, 0.8], + color: [255, 255, 0, 0.6], width: 3, lineDash: [10, 10], }), @@ -318,71 +318,84 @@ const styles = { iwn: [ new Style({ stroke: new Stroke({ - color: [255, 0, 0, 0.8], - width: 3, - lineDash: [10, 10], - lineDashOffset: 10, + color: [255, 0, 0, 0.6], + width: 7, + // lineDash: [10, 10], + // lineDashOffset: 10, }), }), new Style({ stroke: new Stroke({ - color: [255, 255, 255, 0.8], + color: [255, 255, 255, 0.6], width: 3, - lineDash: [10, 10], - lineDashOffset: 0, + // lineDash: [10, 10], + // lineDashOffset: 0, }), }), ], nwn: [ new Style({ stroke: new Stroke({ - color: [255, 0, 0, 0.8], - width: 3, - lineDash: [10, 10], - lineDashOffset: 10, + color: [255, 0, 0, 0.6], + width: 7, + // lineDash: [10, 10], + // lineDashOffset: 10, }), }), new Style({ stroke: new Stroke({ - color: [255, 255, 255, 0.8], + color: [255, 255, 255, 0.6], width: 3, - lineDash: [10, 10], - lineDashOffset: 0, + // lineDash: [10, 10], + // lineDashOffset: 0, }), }), ], rwn: [ new Style({ stroke: new Stroke({ - color: [255, 0, 0, 0.8], - width: 3, - lineDash: [10, 10], - lineDashOffset: 10, + color: [255, 255, 0, 0.6], + width: 7, + // lineDash: [10, 10], + // lineDashOffset: 10, }), }), new Style({ stroke: new Stroke({ - color: [255, 255, 0, 0.8], + color: [255, 0, 0, 0.6], width: 3, - lineDash: [10, 10], - lineDashOffset: 0, + // lineDash: [10, 10], + // lineDashOffset: 0, }), }), ], lwn: [ new Style({ stroke: new Stroke({ - color: [255, 255, 0, 0.8], + color: [0, 0, 255, 0.6], width: 3, }), }), + new Style({ + stroke: new Stroke({ + color: [255, 255, 0, 0.6], + width: 1, + }), + }), ], default: [ new Style({ stroke: new Stroke({ - color: [225, 220, 94, 0.8], - width: 3, + color: [0, 0, 255, 0.6], 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)) { return null; } - if (getZoomInteger() < 12 && !['iwn', 'nwn'].includes(network)) { + if (getZoomInteger() < 11 && !['iwn', 'nwn'].includes(network)) { return null; } - if (getZoomInteger() < 14 && !['iwn', 'nwn', 'lwn'].includes(network)) { + if (getZoomInteger() < 13 && !['iwn', 'nwn', 'lwn'].includes(network)) { return null; } return {