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 bd37d49..726fe6b 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 @@ -210,9 +210,9 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements if (!this.labelToolSettings) return null; let displayText = ''; if (this.labelToolSettings.showFieldName) displayText += feature.get('name') + '\n'; - if (this.labelToolSettings.showCropName) displayText += feature.get('cropTypeName') + '\n'; - if (this.labelToolSettings.showArea) displayText += feature.get('area') + 'ha\n'; - if (this.labelToolSettings.showCentroid) displayText += this.getCentroid(feature); + if (this.labelToolSettings.showCropName && feature.get('cropTypeName')) displayText += feature.get('cropTypeName') + '\n'; + if (this.labelToolSettings.showArea && feature.get('area')) displayText += feature.get('area') + 'ha\n'; + if (this.labelToolSettings.showCentroid && this.getCentroid(feature)) displayText += this.getCentroid(feature); return new style.Text({ font: '13px Calibri,sans-serif',