From b9d886db69d95416f4c9bd6ac47dcc1da52733da Mon Sep 17 00:00:00 2001 From: evlist Date: Fri, 3 Feb 2023 17:31:20 +0100 Subject: [PATCH] Slight style update --- src/components/gpx/styles.ts | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/src/components/gpx/styles.ts b/src/components/gpx/styles.ts index db59bab..b065ab9 100644 --- a/src/components/gpx/styles.ts +++ b/src/components/gpx/styles.ts @@ -269,48 +269,24 @@ const styles = { return new Style({ stroke: isSelected ? rteStrokeSel : rteStroke }); }, memoizeOptions), }, - route: { - getParameters: (feature: Feature) => { - return { - isSelected: feature.get('isSelected') ?? false, - name: feature.get('name'), - }; - }, - getStyle: memoize((params: any) => { - console.log({ caller: 'getStyle', params }); - const { isSelected, name } = params; - return new Style({ - stroke: isSelected ? routeStrokeSel : routeStroke, - text: new Text({ - text: name, - font: 'bold 14px "Open Sans", "Arial Unicode MS", "sans-serif"', - placement: 'line', - padding: [2, 2, 2, 2], - fill: new Fill({ - color: 'black', - }), - }), - }); - }, memoizeOptions), - }, - way: { + way: { strokes: { iwn: new Stroke({ color: [174, 33, 219, 0.8], - width: 6, + width: 3, }), nwn: new Stroke({ color: [174, 33, 219, 0.8], - width: 5, + width: 3, }), rwn: new Stroke({ color: [174, 33, 219, 0.8], - width: 5, + width: 2, lineDash: [10, 10], }), lwn: new Stroke({ color: [174, 33, 219, 0.8], - width: 3, + width: 2, lineDash: [10, 10], }), default: new Stroke({