Slight style update

This commit is contained in:
Eric van der Vlist 2023-02-03 17:31:20 +01:00
parent db337892c4
commit b9d886db69
1 changed files with 5 additions and 29 deletions

View File

@ -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: {
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({