diff --git a/projects/common-map/src/fm-map/components/aol/item-layers/item-layers.component.ts b/projects/common-map/src/fm-map/components/aol/item-layers/item-layers.component.ts index 44f16c6..652f47d 100644 --- a/projects/common-map/src/fm-map/components/aol/item-layers/item-layers.component.ts +++ b/projects/common-map/src/fm-map/components/aol/item-layers/item-layers.component.ts @@ -310,6 +310,9 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange if(this.itemLayers) { this.updateLayers(this.itemLayers); } else if(this.itemLayer) { + if(this.itemLayer.item.itemType == 'vnd.farmmaps.itemtype.shape.processed') { + this.installMapEventHandler(); + } this.updateLayers([this.itemLayer]) } else { this.updateLayers([]); @@ -439,6 +442,6 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange ngOnDestroy() { this.unInstallMapEventHandler(); - this.map.instance.removeLayer(this.instance); + super.ngOnDestroy(); } }