diff --git a/projects/common-map/src/fm-map/components/aol/item-vector-source/item-vector-source.component.ts b/projects/common-map/src/fm-map/components/aol/item-vector-source/item-vector-source.component.ts index 69e725d..30a537f 100644 --- a/projects/common-map/src/fm-map/components/aol/item-vector-source/item-vector-source.component.ts +++ b/projects/common-map/src/fm-map/components/aol/item-vector-source/item-vector-source.component.ts @@ -112,17 +112,18 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements this.host.instance.setSource(this.instance); this.host.instance.setStyle((feature) => { - var key = feature.get('itemType') + (this.selectedItem?"_I":""); + var itemType = feature.get('itemType'); + var key = itemType + (this.selectedItem?"_I":""); if (!this.stylesCache[key]) { - if (this.itemTypeService.itemTypes[key]) { - let itemType = this.itemTypeService.itemTypes[key]; + if (this.itemTypeService.itemTypes[itemType]) { + let itemTypeEntry = this.itemTypeService.itemTypes[itemType]; let fillColor = color.asArray(itemType.iconColor); fillColor[3] = 0; this.stylesCache[key] = new style.Style({ - image: itemType.icon ? new style.Icon({ + image: itemTypeEntry.icon ? new style.Icon({ anchor: [0.5, 1], scale: 0.05, - src: this.featureIconService$.getIconImageDataUrl(itemType.icon) + src: this.featureIconService$.getIconImageDataUrl(itemTypeEntry.icon) }):null, stroke: new style.Stroke({ color: 'red',