Skip to content

Commit

Permalink
make route slightly lighter and alternatives nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
karussell committed Apr 16, 2024
1 parent ae82722 commit 521c9c0
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions src/layers/UsePathsLayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,20 @@ function removeCurrentPathLayers(map: Map) {
}

function addUnselectedPathsLayer(map: Map, paths: Path[]) {
const style = new Style({
stroke: new Stroke({
color: '#5B616A',
width: 5,
lineCap: 'round',
lineJoin: 'round',
const styleArray = [
new Style({
stroke: new Stroke({
color: 'rgba(39,93,173,1)',
width: 6,
}),
}),
})
new Style({
stroke: new Stroke({
color: 'rgba(201,217,241,0.8)',
width: 4,
}),
}),
]
const layer = new VectorLayer({
source: new VectorSource({
features: paths.map((path: Path, index) => {
Expand All @@ -62,8 +68,8 @@ function addUnselectedPathsLayer(map: Map, paths: Path[]) {
return f
}),
}),
style: () => style,
opacity: 0.8,
style: styleArray,
opacity: 0.7,
zIndex: 1,
})
layer.set(pathsLayerKey, true)
Expand Down Expand Up @@ -142,13 +148,13 @@ function addSelectedPathsLayer(map: Map, selectedPath: Path) {
new Style({
stroke: new Stroke({
color: 'rgba(255,255,255,1)',
width: 7,
width: 9,
}),
}),
new Style({
stroke: new Stroke({
color: 'rgba(39,93,173,1)',
width: 5,
color: 'rgb(49,104,187)',
width: 7,
}),
}),
]
Expand Down

0 comments on commit 521c9c0

Please sign in to comment.