Set color default to no value color
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma 2021-03-20 20:07:31 +01:00
parent fe1fddd211
commit 8907dca091

View File

@ -75,6 +75,9 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
getColorForValue(layer: ILayer, value: number): IColor { getColorForValue(layer: ILayer, value: number): IColor {
var color: IColor = { alpha:0,red:0,green:0,blue:0}; var color: IColor = { alpha:0,red:0,green:0,blue:0};
if(layer.renderer.colorMap.entries.length>0) {
color=layer.renderer.colorMap.noValue.color;
}
layer.renderer.colorMap.entries.forEach((entry) => { layer.renderer.colorMap.entries.forEach((entry) => {
if(entry.value==value) { if(entry.value==value) {
color =entry.color; color =entry.color;