Commit 79ce6011 authored by alain's avatar alain 🐙
Browse files

display of sensors gone wild

parent 98f4d83f
......@@ -53,7 +53,7 @@ class StationLayer extends CompositeLayer {
const radius = radiusScale(zoom) * factor * (count.total > 1 ? 0.5 : 1)
const getHeight = (value, zoom) => {
const renderValue = Math.min(value, range[1])
const renderValue = value > range[1] * 2 ? range[1] / 12 : Math.min(value, range[1])
const elevationScale = (scale === 'log' ? scaleLog(range, [0, heightMaxScale(zoom)]) : scaleLinear(range, [0, heightMaxScale(zoom)]))
return elevationScale(renderValue)
}
......@@ -70,18 +70,14 @@ class StationLayer extends CompositeLayer {
getElevation: d => getHeight(d.mean, zoom),
getPosition: d => this.getCoordinates(d, count, radius),
getFillColor: d => {
if(d.mean === null) {
if(d.mean === null || d.mean > range[1]*2) {
let color = getColorArray(mapItemSettings.colorOffline)
color[3] = color[3] * 0.5
return color
} else {
let color = getColorArray(getColor(d.mean, legend, (scale === 'log')))
//if(d.dataAge > 3) color = changeColorLuminance(color, -0.015 * d.dataAge)
//if(d.dataAge > 4)
color[3] = color[3] * (1 - 0.1 * d.dataAge)
return color
}
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment