Skip to content

Commit

Permalink
style: 10 step vik scale
Browse files Browse the repository at this point in the history
  • Loading branch information
tylercchase committed Dec 2, 2024
1 parent 3cab064 commit 8dbf5ec
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/app/services/map/map.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,19 @@ export class MapService {
// Eventually let users define this part somehow
let defined_stops: (number | number[])[][] = [
// [Stop, Color[R,G,B]]
[0.0, [255,0,0]],
[0.5, [255,255,255]],
[1.0, [0,0,255]],
[1.0, [0, 18, 97]],
[29.0, [3, 62, 125]],
[58.0, [30, 111, 157]],
[86.0, [113, 168, 196]],
[114.0, [201, 221, 231]],
[143.0, [234, 206, 189]],
[171.0, [211, 151, 116]],
[199.0, [190, 101, 51]],
[228.0, [139, 39, 6]],
[256.0, [89, 0, 8]],
// [0.0, [89,0,8]],
// [0.5, [255,255,255]],
// [1.0, [0,18,97]],
];

let parsed_color_stops = defined_stops.flat().map(x => {
Expand All @@ -791,7 +801,7 @@ export class MapService {
color: [
'interpolate',
['linear'],
['band', 1],
['*', ['band', 1], 255],
...parsed_color_stops
]
},
Expand Down

0 comments on commit 8dbf5ec

Please sign in to comment.