dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Components
Label Class
Defines label expressions, symbols, scale ranges, label priorities, and label placement options for labels on a layer.
ArcGIS Maps SDK for JavaScript
public class Label : dymaptic.GeoBlazor.Core.Components.MapComponent
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 Label
Constructors
Label() Constructor
Parameterless constructor for use as a Razor Component.
public Label();
Label(Nullable, string, LabelExpressionInfo, Symbol, Nullable, Nullable, Nullable, Nullable, Nullable, Nullable, Dimension, Nullable, string) Constructor
Constructor for use in C# code. Use named parameters (e.g., item1: value1, item2: value2) to set properties in any order.
public Label(System.Nullable<dymaptic.GeoBlazor.Core.Enums.LabelPlacement> labelPlacement=null, string? labelExpression=null, dymaptic.GeoBlazor.Core.Components.LabelExpressionInfo? labelExpressionInfo=null, dymaptic.GeoBlazor.Core.Components.Symbols.Symbol? symbol=null, System.Nullable<bool> allowOverrun=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.DeconflictionStrategy> deconflictionStrategy=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.LabelPosition> labelPosition=null, System.Nullable<double> maxScale=null, System.Nullable<double> minScale=null, System.Nullable<bool> repeatLabel=null, dymaptic.GeoBlazor.Core.Model.Dimension? repeatLabelDistance=null, System.Nullable<bool> useCodedValues=null, string? where=null);
Parameters
labelPlacement
System.Nullable<LabelPlacement>
The position of the label.
default null
ArcGIS Maps SDK for JavaScript
labelExpression
System.String
Defines the labels for a MapImageLayer.
default null
ArcGIS Maps SDK for JavaScript
labelExpressionInfo
LabelExpressionInfo
Defines the labels for a FeatureLayer.
default null
ArcGIS Maps SDK for JavaScript
symbol
Symbol
Defines the symbol used for rendering the label.
ArcGIS Maps SDK for JavaScript
allowOverrun
System.Nullable<System.Boolean>
Specifies whether or not a polyline label can overrun the feature being labeled.
default false
ArcGIS Maps SDK for JavaScript
deconflictionStrategy
System.Nullable<DeconflictionStrategy>
Defines how labels should be placed relative to one another.
default “static”
ArcGIS Maps SDK for JavaScript
labelPosition
System.Nullable<LabelPosition>
Specifies the orientation of the label position of a single line polyline label.
default “curved”
ArcGIS Maps SDK for JavaScript
maxScale
System.Nullable<System.Double>
The maximum scale (most zoomed in) at which labels are visible in the view.
default 0
ArcGIS Maps SDK for JavaScript
minScale
System.Nullable<System.Double>
The minimum scale (most zoomed out) at which labels are visible in the view.
default 0
ArcGIS Maps SDK for JavaScript
repeatLabel
System.Nullable<System.Boolean>
Indicates whether or not to repeat the label along the polyline feature.
default true
ArcGIS Maps SDK for JavaScript
repeatLabelDistance
Dimension
The size in points of the distance between labels on a polyline.
default null
ArcGIS Maps SDK for JavaScript
useCodedValues
System.Nullable<System.Boolean>
Indicates whether to use domain names if the fields in the labelExpression
or labelExpressionInfo have domains.
ArcGIS Maps SDK for JavaScript
where
System.String
A SQL where clause used to determine the features to which the label class should be applied.
default null
ArcGIS Maps SDK for JavaScript
Properties
Label.AllowOverrun Property
Specifies whether or not a polyline label can overrun the feature being labeled.
default false
ArcGIS Maps SDK for JavaScript
public System.Nullable<bool> AllowOverrun { get; set; }
Property Value
System.Nullable<System.Boolean>
Label.DeconflictionStrategy Property
Defines how labels should be placed relative to one another. By default, labels have a static deconfliction strategy, meaning labels that overlap are dropped to make them easier to read.
In some cases where few labels overlap, it may be preferable to turn off label deconfliction with the none option. It is also advisable to turn off deconfliction when labeling clusters with a count of features in the center of the cluster.
public System.Nullable<dymaptic.GeoBlazor.Core.Enums.DeconflictionStrategy> DeconflictionStrategy { get; set; }
Property Value
System.Nullable<DeconflictionStrategy>
Remarks
Currently, this property only applies to FeatureLayer, CSVLayer, and StreamLayer in 2D MapViews.
Label.LabelExpression Property
Defines the labels for a MapImageLayer.
public string? LabelExpression { get; set; }
Property Value
Remarks
MapImageLayer not yet implemented in GeoBlazor
Label.LabelExpressionInfo Property
Defines the labels for a FeatureLayer.
default null
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Core.Components.LabelExpressionInfo? LabelExpressionInfo { get; set; }
Property Value
Label.LabelPlacement Property
The position of the label.
public System.Nullable<dymaptic.GeoBlazor.Core.Enums.LabelPlacement> LabelPlacement { get; set; }
Property Value
System.Nullable<LabelPlacement>
Label.LabelPosition Property
Specifies the orientation of the label position of a polyline label. If “curved”, this means the characters follow the curve of the polyline, while “parallel” means the characters will always be straight, and the orientation will be based on the angle of the polyline’s curve at the label’s position.
Default Value: curved
public System.Nullable<dymaptic.GeoBlazor.Core.Enums.LabelPosition> LabelPosition { get; set; }
Property Value
System.Nullable<LabelPosition>
Remarks
Currently, this property only applies to Polyline FeatureLayer and CSVLayer in 2D MapViews.
Currently, this property cannot be saved as part of a WebMap.
Label.MaxScale Property
The maximum scale (most zoomed in) at which labels are visible in the view. A value of 0 means the label’s visibility does not have a maximum scale. The maxScale value should always be smaller than the minScale value, and greater than or equal to the service specification.
Default Value:0
public System.Nullable<double> MaxScale { get; set; }
Property Value
System.Nullable<System.Double>
Label.MinScale Property
The minimum scale (most zoomed out) at which labels are visible in the view. A value of 0 means the label’s visibility does not have a minimum scale. The minScale value should always be larger than the maxScale value, and less than or equal to the service specification.
public System.Nullable<double> MinScale { get; set; }
Property Value
System.Nullable<System.Double>
Label.RepeatLabel Property
Indicates whether or not to repeat the label along the polyline feature. If true, the label will be repeated according to the repeatLabelDistance. If false, the label will display once per polyline segment.
public System.Nullable<bool> RepeatLabel { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Currently, this property only applies to Polyline FeatureLayer and CSVLayer in 2D MapViews.
Label.RepeatLabelDistance Property
The size in points of the distance between labels on a polyline. This value may be autocast with a string expressing size in points or pixels (e.g. 100, or “64pt”, or “128px”). The repeatLabel property must be true for this property to be honored.
public dymaptic.GeoBlazor.Core.Model.Dimension? RepeatLabelDistance { get; set; }
Property Value
Remarks
Currently, this property only applies to Polyline FeatureLayer and CSVLayer in 2D MapViews.
Label.Symbol Property
Defines the symbol used for rendering the label.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Core.Components.Symbols.Symbol? Symbol { get; set; }
Property Value
Label.UseCodedValues Property
Indicates whether to use domain names if the fields in the labelExpression or labelExpressionInfo have domains.
public System.Nullable<bool> UseCodedValues { get; set; }
Property Value
System.Nullable<System.Boolean>
Label.Where Property
A SQL where clause used to determine the features to which the label class should be applied. When specified, only features evaluating to true based on this expression will be labeled.
Default Value:null
public string? Where { get; set; }
Property Value
Methods
Label.GetAllowOverrun() Method
Asynchronously retrieve the current value of the AllowOverrun property.
public System.Threading.Tasks.Task<System.Nullable<bool>> GetAllowOverrun();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
Label.GetDeconflictionStrategy() Method
Asynchronously retrieve the current value of the DeconflictionStrategy property.
public System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Core.Enums.DeconflictionStrategy>> GetDeconflictionStrategy();
Returns
System.Threading.Tasks.Task<System.Nullable<DeconflictionStrategy>>
Label.GetLabelExpression() Method
Asynchronously retrieve the current value of the LabelExpression property.
public System.Threading.Tasks.Task<string?> GetLabelExpression();
Returns
System.Threading.Tasks.Task<System.String>
Label.GetLabelExpressionInfo() Method
Asynchronously retrieve the current value of the LabelExpressionInfo property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.LabelExpressionInfo?> GetLabelExpressionInfo();
Returns
System.Threading.Tasks.Task<LabelExpressionInfo>
Label.GetLabelPlacement() Method
Asynchronously retrieve the current value of the LabelPlacement property.
public System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Core.Enums.LabelPlacement>> GetLabelPlacement();
Returns
System.Threading.Tasks.Task<System.Nullable<LabelPlacement>>
Label.GetLabelPosition() Method
Asynchronously retrieve the current value of the LabelPosition property.
public System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Core.Enums.LabelPosition>> GetLabelPosition();
Returns
System.Threading.Tasks.Task<System.Nullable<LabelPosition>>
Label.GetMaxScale() Method
Asynchronously retrieve the current value of the MaxScale property.
public System.Threading.Tasks.Task<System.Nullable<double>> GetMaxScale();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Double>>
Label.GetMinScale() Method
Asynchronously retrieve the current value of the MinScale property.
public System.Threading.Tasks.Task<System.Nullable<double>> GetMinScale();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Double>>
Label.GetRepeatLabel() Method
Asynchronously retrieve the current value of the RepeatLabel property.
public System.Threading.Tasks.Task<System.Nullable<bool>> GetRepeatLabel();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
Label.GetRepeatLabelDistance() Method
Asynchronously retrieve the current value of the RepeatLabelDistance property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Model.Dimension?> GetRepeatLabelDistance();
Returns
System.Threading.Tasks.Task<Dimension>
Label.GetSymbol() Method
Gets the current Symbol for the object.
public virtual System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Symbols.Symbol?> GetSymbol();
Returns
System.Threading.Tasks.Task<Symbol>
Label.GetUseCodedValues() Method
Asynchronously retrieve the current value of the UseCodedValues property.
public System.Threading.Tasks.Task<System.Nullable<bool>> GetUseCodedValues();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
Label.GetWhere() Method
Asynchronously retrieve the current value of the Where property.
public System.Threading.Tasks.Task<string?> GetWhere();
Returns
System.Threading.Tasks.Task<System.String>
Label.SetAllowOverrun(Nullable) Method
Asynchronously set the value of the AllowOverrun property after render.
public System.Threading.Tasks.Task SetAllowOverrun(System.Nullable<bool> value);
Parameters
value
System.Nullable<System.Boolean>
The value to set.
Returns
Label.SetDeconflictionStrategy(Nullable) Method
Asynchronously set the value of the DeconflictionStrategy property after render.
public System.Threading.Tasks.Task SetDeconflictionStrategy(System.Nullable<dymaptic.GeoBlazor.Core.Enums.DeconflictionStrategy> value);
Parameters
value
System.Nullable<DeconflictionStrategy>
The value to set.
Returns
Label.SetLabelExpression(string) Method
Asynchronously set the value of the LabelExpression property after render.
public System.Threading.Tasks.Task SetLabelExpression(string? value);
Parameters
value
System.String
The value to set.
Returns
Label.SetLabelExpressionInfo(LabelExpressionInfo) Method
Asynchronously set the value of the LabelExpressionInfo property after render.
public System.Threading.Tasks.Task SetLabelExpressionInfo(dymaptic.GeoBlazor.Core.Components.LabelExpressionInfo? value);
Parameters
value
LabelExpressionInfo
The value to set.
Returns
Label.SetLabelPlacement(Nullable) Method
Asynchronously set the value of the LabelPlacement property after render.
public System.Threading.Tasks.Task SetLabelPlacement(System.Nullable<dymaptic.GeoBlazor.Core.Enums.LabelPlacement> value);
Parameters
value
System.Nullable<LabelPlacement>
The value to set.
Returns
Label.SetLabelPosition(Nullable) Method
Asynchronously set the value of the LabelPosition property after render.
public System.Threading.Tasks.Task SetLabelPosition(System.Nullable<dymaptic.GeoBlazor.Core.Enums.LabelPosition> value);
Parameters
value
System.Nullable<LabelPosition>
The value to set.
Returns
Label.SetMaxScale(Nullable) Method
Asynchronously set the value of the MaxScale property after render.
public System.Threading.Tasks.Task SetMaxScale(System.Nullable<double> value);
Parameters
value
System.Nullable<System.Double>
The value to set.
Returns
Label.SetMinScale(Nullable) Method
Asynchronously set the value of the MinScale property after render.
public System.Threading.Tasks.Task SetMinScale(System.Nullable<double> value);
Parameters
value
System.Nullable<System.Double>
The value to set.
Returns
Label.SetRepeatLabel(Nullable) Method
Asynchronously set the value of the RepeatLabel property after render.
public System.Threading.Tasks.Task SetRepeatLabel(System.Nullable<bool> value);
Parameters
value
System.Nullable<System.Boolean>
The value to set.
Returns
Label.SetRepeatLabelDistance(Dimension) Method
Asynchronously set the value of the RepeatLabelDistance property after render.
public System.Threading.Tasks.Task SetRepeatLabelDistance(dymaptic.GeoBlazor.Core.Model.Dimension? value);
Parameters
value
Dimension
The value to set.
Returns
Label.SetSymbol(Symbol) Method
Sets the Symbol for the object.
public virtual System.Threading.Tasks.Task SetSymbol(dymaptic.GeoBlazor.Core.Components.Symbols.Symbol symbol);
Parameters
symbol
Symbol
The Symbol for the object.
Returns
Label.SetUseCodedValues(Nullable) Method
Asynchronously set the value of the UseCodedValues property after render.
public System.Threading.Tasks.Task SetUseCodedValues(System.Nullable<bool> value);
Parameters
value
System.Nullable<System.Boolean>
The value to set.
Returns
Label.SetWhere(string) Method
Asynchronously set the value of the Where property after render.
public System.Threading.Tasks.Task SetWhere(string? value);
Parameters
value
System.String
The value to set.
Returns
Label.ValidateRequiredGeneratedChildren() Method
Validates source-generated child components.
public override void ValidateRequiredGeneratedChildren();
Implements ValidateRequiredGeneratedChildren()