AW1873 labels -> undefined/null fixes
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
e374bb8a73
commit
20dff38cf7
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user