layout: default title: OpacityVariable parent: Core Classes —
dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Components.Layers
OpacityVariable Class
The opacity visual variable defines the opacity of each feature’s symbol based on a numeric field value or number returned from an expression. You must specify stops to construct the opacity ramp.
ArcGIS Maps SDK for JavaScript
public class OpacityVariable : dymaptic.GeoBlazor.Core.Components.Layers.VisualVariable
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 VisualVariable 🡒 OpacityVariable
Constructors
OpacityVariable() Constructor
Parameterless constructor for using as a razor component
public OpacityVariable();
OpacityVariable(string, string, IReadOnlyList) Constructor
Constructs a new OpacityVariable in code with parameters
public OpacityVariable(string field, string? normalizationField=null, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.OpacityStop>? stops=null);
Parameters
field
System.String
The name of the numeric attribute field that contains the data values used to determine the opacity of each feature.
normalizationField
System.String
The name of the numeric attribute field by which to normalize the data. If this field is used, then the values in stops should be normalized as percentages or ratios.
stops
System.Collections.Generic.IReadOnlyList<OpacityStop>
An array of objects that defines the opacity to apply to features in a layer in a sequence of stops. You must specify 2 - 8 stops. In most cases, no more than five are needed. Features with data values that fall between the given stops will be assigned opacity values linearly interpolated along the ramp in relation to the stop values. The stops must be listed in ascending order based on the value of the value property in each stop.
Properties
OpacityVariable.NormalizationField Property
Name of the numeric attribute field by which to normalize the data. If this field is used, then the values in stops should be normalized as percentages or ratios.
public string? NormalizationField { get; set; }
Property Value
OpacityVariable.Stops Property
An array of objects that defines the opacity to apply to features in a layer in a sequence of stops. You must specify 2 - 8 stops. In most cases, no more than five are needed. Features with data values that fall between the given stops will be assigned opacity values linearly interpolated along the ramp in relation to the stop values. The stops must be listed in ascending order based on the value of the value property in each stop.
public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.OpacityStop>? Stops { get; set; }
Property Value
System.Collections.Generic.IReadOnlyList<OpacityStop>
OpacityVariable.VariableType Property
The visual variable type.
public override dymaptic.GeoBlazor.Core.Components.Layers.VisualVariableType VariableType { get; }
Property Value
Methods
OpacityVariable.RegisterChildComponent(MapComponent) Method
Called from dymaptic.GeoBlazor.Core.Components.MapComponent.OnInitializedAsync to “Register” the current component with it’s parent.
public override System.Threading.Tasks.Task RegisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);
Parameters
child
MapComponent
The calling, child component to register
Returns
Exceptions
InvalidChildElementException
Throws if the current child is not a valid sub-component to the parent.
Remarks
This method is an implementation detail and should not be called directly by consumers. In future versions, this may be changed to an internal method. If you see no other way to register a child component, please open an issue on GitHub.
OpacityVariable.UnregisterChildComponent(MapComponent) Method
Undoes the “Registration” of a child with its parent.
public override System.Threading.Tasks.Task UnregisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);
Parameters
child
MapComponent
The child to unregister
Returns
Remarks
This method is an implementation detail and should not be called directly by consumers. In future versions, this may be changed to an internal method.