Use indexKey if specified
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma 2020-09-16 15:02:42 +02:00
parent 394bbab320
commit c44c771feb

View File

@ -49,7 +49,7 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
} }
getColorFromGradient(item:IItem,layer: ILayer, feature): style.Style { getColorFromGradient(item:IItem,layer: ILayer, feature): style.Style {
var value = feature.get(layer.name); var value = layer.indexKey ? feature.get(layer.indexKey): feature.get(layer.name);
var key = item.code + "_" + value; var key = item.code + "_" + value;
if(!this.styleCache[key]) { if(!this.styleCache[key]) {
var gradient: IGradientstop[] = layer.renderer.colorMap.gradient; var gradient: IGradientstop[] = layer.renderer.colorMap.gradient;