dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Components
SnappingOptions Class
The SnappingOptions
allows users to configure snapping for their editing or drawing experience in both the Sketch and Editor widgets.
ArcGIS Maps SDK for JavaScript
public class SnappingOptions : dymaptic.GeoBlazor.Core.Components.MapComponent
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 SnappingOptions
Constructors
SnappingOptions() Constructor
Parameterless constructor for use as a Razor Component.
public SnappingOptions();
SnappingOptions(Nullable, Nullable, Nullable, Nullable, IReadOnlyList, Nullable, Nullable) Constructor
Constructor for use in C# code. Use named parameters (e.g., item1: value1, item2: value2) to set properties in any order.
public SnappingOptions(System.Nullable<bool> attributeRulesEnabled=null, System.Nullable<double> distance=null, System.Nullable<bool> enabled=null, System.Nullable<bool> featureEnabled=null, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.FeatureSnappingLayerSource>? featureSources=null, System.Nullable<bool> gridEnabled=null, System.Nullable<bool> selfEnabled=null);
Parameters
attributeRulesEnabled
System.Nullable<System.Boolean>
When true, enables support for attribute rule-based snapping.
default false
ArcGIS Maps SDK for JavaScript
distance
System.Nullable<System.Double>
Snapping distance for snapping in pixels.
default 5
ArcGIS Maps SDK for JavaScript
enabled
System.Nullable<System.Boolean>
Global configuration to turn snapping on or off.
default false
ArcGIS Maps SDK for JavaScript
featureEnabled
System.Nullable<System.Boolean>
Global configuration option to turn feature snapping on or off.
default true
ArcGIS Maps SDK for JavaScript
featureSources
System.Collections.Generic.IReadOnlyList<FeatureSnappingLayerSource>
List of sources for feature snapping.
ArcGIS Maps SDK for JavaScript
gridEnabled
System.Nullable<System.Boolean>
Turns the grid on or off.
default false
ArcGIS Maps SDK for JavaScript
selfEnabled
System.Nullable<System.Boolean>
Global configuration option to turn self snapping (within one feature while
either drawing or reshaping) on or off.
default true
ArcGIS Maps SDK for JavaScript
Properties
SnappingOptions.AttributeRulesEnabled Property
When true, enables support for attribute rule-based snapping.
default false
ArcGIS Maps SDK for JavaScript
public System.Nullable<bool> AttributeRulesEnabled { get; set; }
Property Value
System.Nullable<System.Boolean>
SnappingOptions.Distance Property
Snapping distance for snapping in pixels.
Default Value:5
public System.Nullable<double> Distance { get; set; }
Property Value
System.Nullable<System.Double>
SnappingOptions.Enabled Property
Global configuration to turn snapping on or off. Note that snapping is turned off by default.
Default Value:false
public System.Nullable<bool> Enabled { get; set; }
Property Value
System.Nullable<System.Boolean>
SnappingOptions.FeatureEnabled Property
Global configuration option to turn feature snapping on or off.
Default Value:true
public System.Nullable<bool> FeatureEnabled { get; set; }
Property Value
System.Nullable<System.Boolean>
SnappingOptions.FeatureSources Property
List of sources for feature snapping.
ArcGIS Maps SDK for JavaScript
public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.FeatureSnappingLayerSource>? FeatureSources { get; set; }
Property Value
System.Collections.Generic.IReadOnlyList<FeatureSnappingLayerSource>
SnappingOptions.GridEnabled Property
Turns the grid on or off.
default false
ArcGIS Maps SDK for JavaScript
public System.Nullable<bool> GridEnabled { get; set; }
Property Value
System.Nullable<System.Boolean>
SnappingOptions.SelfEnabled Property
Global configuration option to turn self snapping (within one feature while either drawing or reshaping) on or off.
Default Value:true
public System.Nullable<bool> SelfEnabled { get; set; }
Property Value
System.Nullable<System.Boolean>
Methods
SnappingOptions.AddToFeatureSources(FeatureSnappingLayerSource[]) Method
Asynchronously adds elements to the FeatureSources property.
public System.Threading.Tasks.Task AddToFeatureSources(params dymaptic.GeoBlazor.Core.Components.FeatureSnappingLayerSource[] values);
Parameters
values
FeatureSnappingLayerSource[]
The elements to add.
Returns
SnappingOptions.GetAttributeRulesEnabled() Method
Asynchronously retrieve the current value of the AttributeRulesEnabled property.
public System.Threading.Tasks.Task<System.Nullable<bool>> GetAttributeRulesEnabled();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
SnappingOptions.GetDistance() Method
Asynchronously retrieve the current value of the Distance property.
public System.Threading.Tasks.Task<System.Nullable<double>> GetDistance();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Double>>
SnappingOptions.GetEnabled() Method
Asynchronously retrieve the current value of the Enabled property.
public System.Threading.Tasks.Task<System.Nullable<bool>> GetEnabled();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
SnappingOptions.GetFeatureEnabled() Method
Asynchronously retrieve the current value of the FeatureEnabled property.
public System.Threading.Tasks.Task<System.Nullable<bool>> GetFeatureEnabled();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
SnappingOptions.GetFeatureSources() Method
Asynchronously retrieve the current value of the FeatureSources property.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.FeatureSnappingLayerSource>?> GetFeatureSources();
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<FeatureSnappingLayerSource>>
SnappingOptions.GetGridEnabled() Method
Asynchronously retrieve the current value of the GridEnabled property.
public System.Threading.Tasks.Task<System.Nullable<bool>> GetGridEnabled();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
SnappingOptions.GetSelfEnabled() Method
Asynchronously retrieve the current value of the SelfEnabled property.
public System.Threading.Tasks.Task<System.Nullable<bool>> GetSelfEnabled();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
SnappingOptions.RemoveFromFeatureSources(FeatureSnappingLayerSource[]) Method
Asynchronously remove an element from the FeatureSources property.
public System.Threading.Tasks.Task RemoveFromFeatureSources(params dymaptic.GeoBlazor.Core.Components.FeatureSnappingLayerSource[] values);
Parameters
values
FeatureSnappingLayerSource[]
The elements to remove.
Returns
SnappingOptions.SetAttributeRulesEnabled(Nullable) Method
Asynchronously set the value of the AttributeRulesEnabled property after render.
public System.Threading.Tasks.Task SetAttributeRulesEnabled(System.Nullable<bool> value);
Parameters
value
System.Nullable<System.Boolean>
The value to set.
Returns
SnappingOptions.SetDistance(Nullable) Method
Asynchronously set the value of the Distance property after render.
public System.Threading.Tasks.Task SetDistance(System.Nullable<double> value);
Parameters
value
System.Nullable<System.Double>
The value to set.
Returns
SnappingOptions.SetEnabled(Nullable) Method
Asynchronously set the value of the Enabled property after render.
public System.Threading.Tasks.Task SetEnabled(System.Nullable<bool> value);
Parameters
value
System.Nullable<System.Boolean>
The value to set.
Returns
SnappingOptions.SetFeatureEnabled(Nullable) Method
Asynchronously set the value of the FeatureEnabled property after render.
public System.Threading.Tasks.Task SetFeatureEnabled(System.Nullable<bool> value);
Parameters
value
System.Nullable<System.Boolean>
The value to set.
Returns
SnappingOptions.SetFeatureSources(IReadOnlyList) Method
Asynchronously set the value of the FeatureSources property after render.
public System.Threading.Tasks.Task SetFeatureSources(System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.FeatureSnappingLayerSource>? value);
Parameters
value
System.Collections.Generic.IReadOnlyList<FeatureSnappingLayerSource>
The value to set.
Returns
SnappingOptions.SetGridEnabled(Nullable) Method
Asynchronously set the value of the GridEnabled property after render.
public System.Threading.Tasks.Task SetGridEnabled(System.Nullable<bool> value);
Parameters
value
System.Nullable<System.Boolean>
The value to set.
Returns
SnappingOptions.SetSelfEnabled(Nullable) Method
Asynchronously set the value of the SelfEnabled property after render.
public System.Threading.Tasks.Task SetSelfEnabled(System.Nullable<bool> value);
Parameters
value
System.Nullable<System.Boolean>
The value to set.
Returns
SnappingOptions.ValidateRequiredGeneratedChildren() Method
Validates source-generated child components.
public override void ValidateRequiredGeneratedChildren();
Implements ValidateRequiredGeneratedChildren()