log10(0) is not defined - also: make region borders less intrusive for depending on number of events. As it was, it was hard to see the underlying geography.

This commit is contained in:
gluap 2023-04-10 13:10:03 +02:00
parent 56c9d2e455
commit fb3e8bf701
No known key found for this signature in database

View file

@ -163,7 +163,7 @@ export const getRegionLayers = (
"fill-opacity": [
"interpolate",
["linear"],
["log10", ["get", "overtaking_event_count"]],
["log10", ["max",["get", "overtaking_event_count"],1]],
0,
0,
Math.log10(maxValue),
@ -180,7 +180,15 @@ export const getRegionLayers = (
maxzoom: 10,
// filter: [">", "overtaking_event_count", 0],
paint: {
"line-width": 1,
"line-width": [
"interpolate",
["linear"],
["log10", ["max",["get", "overtaking_event_count"],1]],
0,
0.2,
Math.log10(maxValue),
1.5,
],
"line-color": baseColor,
},
layout: {