dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Components.Layers

GraphicsLayer Class

A GraphicsLayer contains one or more client-side Graphics.
ArcGIS Maps SDK for JavaScript

public class GraphicsLayer : dymaptic.GeoBlazor.Core.Components.Layers.Layer,
dymaptic.GeoBlazor.Core.Interfaces.IBlendLayer,
dymaptic.GeoBlazor.Core.Interfaces.IMapComponent,
dymaptic.GeoBlazor.Core.Interfaces.IScaleRangeLayer

Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 Layer 🡒 GraphicsLayer

Implements IBlendLayer, IMapComponent, IScaleRangeLayer

Constructors

GraphicsLayer() Constructor

Parameterless constructor for use as a Razor Component.

public GraphicsLayer();

GraphicsLayer(IReadOnlyCollection, string, Nullable, Nullable, Nullable, Nullable, Nullable, Nullable, Nullable, Nullable, string, Effect, GraphicsLayerElevationInfo, Extent, Nullable, TimeExtent) Constructor

Constructor for use in C# code. Use named parameters (e.g., item1: value1, item2: value2) to set properties in any order.

public GraphicsLayer(System.Collections.Generic.IReadOnlyCollection<dymaptic.GeoBlazor.Core.Components.Graphic>? graphics=null, string? title=null, System.Nullable<double> opacity=null, System.Nullable<bool> visible=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.ListMode> listMode=null, System.Nullable<bool> persistenceEnabled=null, System.Nullable<double> minScale=null, System.Nullable<double> maxScale=null, System.Nullable<bool> screenSizePerspectiveEnabled=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.BlendMode> blendMode=null, string? arcGISLayerId=null, dymaptic.GeoBlazor.Core.Model.Effect? effect=null, dymaptic.GeoBlazor.Core.Components.GraphicsLayerElevationInfo? elevationInfo=null, dymaptic.GeoBlazor.Core.Components.Geometries.Extent? fullExtent=null, System.Nullable<bool> isBasemapReferenceLayer=null, dymaptic.GeoBlazor.Core.Components.TimeExtent? visibilityTimeExtent=null);

Parameters

graphics System.Collections.Generic.IReadOnlyCollection<Graphic>

A collection of graphics in the layer.
ArcGIS Maps SDK for JavaScript

title System.String

The title of the layer used to identify it in places such as the LayerList widget.
ArcGIS Maps SDK for JavaScript

opacity System.Nullable<System.Double>

The opacity of the layer.
default 1
ArcGIS Maps SDK for JavaScript

visible System.Nullable<System.Boolean>

Indicates if the layer is visible in the View.
default true
ArcGIS Maps SDK for JavaScript

listMode System.Nullable<ListMode>

Indicates how the layer should display in the LayerList widget.
default “show”
ArcGIS Maps SDK for JavaScript

persistenceEnabled System.Nullable<System.Boolean>

When true, the layer can be persisted.
default false
ArcGIS Maps SDK for JavaScript

minScale System.Nullable<System.Double>

The minimum scale (most zoomed out) at which the layer is visible in the view.
default 0
ArcGIS Maps SDK for JavaScript

maxScale System.Nullable<System.Double>

The maximum scale (most zoomed in) at which the layer is visible in the view.
default 0
ArcGIS Maps SDK for JavaScript

screenSizePerspectiveEnabled System.Nullable<System.Boolean>

Apply perspective scaling to screen-size point symbols in a SceneView.
default true
ArcGIS Maps SDK for JavaScript

blendMode System.Nullable<BlendMode>

Blend modes are used to blend layers together to create an interesting effect in a layer, or even to produce what seems like a new layer.
default normal
ArcGIS Maps SDK for JavaScript

arcGISLayerId System.String

The unique ID assigned to the layer.
ArcGIS Maps SDK for JavaScript

effect Effect

Effect provides various filter functions that can be performed on the layer to achieve different visual effects similar to
how image filters work.
default null
ArcGIS Maps SDK for JavaScript

elevationInfo GraphicsLayerElevationInfo

Specifies how graphics are placed on the vertical axis (z).
ArcGIS Maps SDK for JavaScript

fullExtent Extent

The full extent of the layer.
ArcGIS Maps SDK for JavaScript

isBasemapReferenceLayer System.Nullable<System.Boolean>

Indicates whether the layer is a basemap reference layer. Default value: false.

visibilityTimeExtent TimeExtent

Specifies a fixed time extent during which a layer should be visible.
default null
ArcGIS Maps SDK for JavaScript

Properties

GraphicsLayer.BlendMode Property

Blend modes are used to blend layers together to create an interesting effect in a layer, or even to produce what seems like a new layer.

public System.Nullable<dymaptic.GeoBlazor.Core.Enums.BlendMode> BlendMode { get; set; }

Implements BlendMode

Property Value

System.Nullable<BlendMode>

GraphicsLayer.Effect Property

Effect provides various filter functions that can be performed on the layer to achieve different visual effects similar to how image filters work. This powerful capability allows you to apply css filter-like functions to layers to create custom visual effects to enhance the cartographic quality of your maps. This is done by applying the desired effect to the layer’s effect property as a string or an array of objects to set scale dependent effects.

public dymaptic.GeoBlazor.Core.Model.Effect? Effect { get; set; }

Implements Effect

Property Value

Effect

GraphicsLayer.ElevationInfo Property

Specifies how graphics are placed on the vertical axis (z).
ArcGIS Maps SDK for JavaScript

public dymaptic.GeoBlazor.Core.Components.GraphicsLayerElevationInfo? ElevationInfo { get; set; }

Property Value

GraphicsLayerElevationInfo

GraphicsLayer.Graphics Property

A collection of Graphics in the layer.

public System.Collections.Generic.IReadOnlyCollection<dymaptic.GeoBlazor.Core.Components.Graphic> Graphics { get; set; }

Property Value

System.Collections.Generic.IReadOnlyCollection<Graphic>

GraphicsLayer.MaxScale Property

The maximum scale (most zoomed in) at which the layer is visible in the view.

public System.Nullable<double> MaxScale { get; set; }

Implements MaxScale

Property Value

System.Nullable<System.Double>

GraphicsLayer.MinScale Property

The minimum scale (most zoomed out) at which the layer is visible in the view.

public System.Nullable<double> MinScale { get; set; }

Implements MinScale

Property Value

System.Nullable<System.Double>

GraphicsLayer.ScreenSizePerspectiveEnabled Property

Apply perspective scaling to screen-size point symbols in a SceneView. When true, screen sized objects such as icons, labels or callouts integrate better in the 3D scene by applying a certain perspective projection to the sizing of features. This only applies when using a SceneView.

public System.Nullable<bool> ScreenSizePerspectiveEnabled { get; set; }

Property Value

System.Nullable<System.Boolean>

GraphicsLayer.Type Property

Used internally to identify the sub type of Layer

public override dymaptic.GeoBlazor.Core.Enums.LayerType Type { get; }

Property Value

LayerType

Methods

GraphicsLayer.Add(Graphic) Method

Add a graphic to the current layer

public System.Threading.Tasks.Task Add(dymaptic.GeoBlazor.Core.Components.Graphic graphic);

Parameters

graphic Graphic

The graphic to add

Returns

System.Threading.Tasks.Task

GraphicsLayer.Add(IEnumerable, CancellationToken) Method

Adds a collection of graphics to the graphics layer

public System.Threading.Tasks.Task Add(System.Collections.Generic.IEnumerable<dymaptic.GeoBlazor.Core.Components.Graphic> graphics, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

graphics System.Collections.Generic.IEnumerable<Graphic>

The graphics to add

cancellationToken System.Threading.CancellationToken

A CancellationToken to cancel the operation

Returns

System.Threading.Tasks.Task

GraphicsLayer.AddMany(IReadOnlyCollection) Method

Adds an array of graphics to the layer.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task AddMany(System.Collections.Generic.IReadOnlyCollection<dymaptic.GeoBlazor.Core.Components.Graphic> graphics);

Parameters

graphics System.Collections.Generic.IReadOnlyCollection<Graphic>

The graphic(s) to add to the layer.

Returns

System.Threading.Tasks.Task

GraphicsLayer.Clear() Method

Removes all graphics from the current layer

public System.Threading.Tasks.Task Clear();

Returns

System.Threading.Tasks.Task

GraphicsLayer.GetBlendMode() Method

Asynchronously retrieve the current value of the BlendMode property.

public System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Core.Enums.BlendMode>> GetBlendMode();

Implements GetBlendMode()

Returns

System.Threading.Tasks.Task<System.Nullable<BlendMode>>

GraphicsLayer.GetEffect() Method

Asynchronously retrieve the current value of the Effect property.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Model.Effect?> GetEffect();

Implements GetEffect()

Returns

System.Threading.Tasks.Task<Effect>

GraphicsLayer.GetElevationInfo() Method

Asynchronously retrieve the current value of the ElevationInfo property.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.GraphicsLayerElevationInfo?> GetElevationInfo();

Returns

System.Threading.Tasks.Task<GraphicsLayerElevationInfo>

GraphicsLayer.GetMaxScale() Method

Asynchronously retrieve the current value of the MaxScale property.

public System.Threading.Tasks.Task<System.Nullable<double>> GetMaxScale();

Implements GetMaxScale()

Returns

System.Threading.Tasks.Task<System.Nullable<System.Double>>

GraphicsLayer.GetMinScale() Method

Asynchronously retrieve the current value of the MinScale property.

public System.Threading.Tasks.Task<System.Nullable<double>> GetMinScale();

Implements GetMinScale()

Returns

System.Threading.Tasks.Task<System.Nullable<System.Double>>

GraphicsLayer.GetScreenSizePerspectiveEnabled() Method

Asynchronously retrieve the current value of the ScreenSizePerspectiveEnabled property.

public System.Threading.Tasks.Task<System.Nullable<bool>> GetScreenSizePerspectiveEnabled();

Returns

System.Threading.Tasks.Task<System.Nullable<System.Boolean>>

GraphicsLayer.RegisterChildComponent(MapComponent) Method

Called from dymaptic.GeoBlazor.Core.Components.MapComponent.OnInitializedAsync to “Register” the current component with its parent.

public override System.Threading.Tasks.Task RegisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);

Parameters

child MapComponent

The calling, child component to register

Returns

System.Threading.Tasks.Task

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.

GraphicsLayer.RegisterExistingGraphicsFromJavaScript(IEnumerable) Method

Registers a set of graphics that were created from JavaScript

public void RegisterExistingGraphicsFromJavaScript(System.Collections.Generic.IEnumerable<dymaptic.GeoBlazor.Core.Components.Graphic> graphics);

Parameters

graphics System.Collections.Generic.IEnumerable<Graphic>

GraphicsLayer.Remove(Graphic) Method

Remove a graphic from the current layer

public System.Threading.Tasks.Task Remove(dymaptic.GeoBlazor.Core.Components.Graphic graphic);

Parameters

graphic Graphic

The graphic to remove

Returns

System.Threading.Tasks.Task

GraphicsLayer.Remove(IReadOnlyCollection) Method

Removes a set of graphics from the current layer

public System.Threading.Tasks.Task Remove(System.Collections.Generic.IReadOnlyCollection<dymaptic.GeoBlazor.Core.Components.Graphic> graphics);

Parameters

graphics System.Collections.Generic.IReadOnlyCollection<Graphic>

The graphics to remove

Returns

System.Threading.Tasks.Task

GraphicsLayer.RemoveAll() Method

Clears all the graphics from the layer.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task RemoveAll();

Returns

System.Threading.Tasks.Task

GraphicsLayer.RemoveMany(IReadOnlyCollection) Method

Removes an array of graphics from the layer.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task RemoveMany(System.Collections.Generic.IReadOnlyCollection<dymaptic.GeoBlazor.Core.Components.Graphic> graphics);

Parameters

graphics System.Collections.Generic.IReadOnlyCollection<Graphic>

The graphics to remove from the layer.

Returns

System.Threading.Tasks.Task

GraphicsLayer.SetBlendMode(Nullable) Method

Asynchronously set the value of the BlendMode property after render.

public System.Threading.Tasks.Task SetBlendMode(System.Nullable<dymaptic.GeoBlazor.Core.Enums.BlendMode> value);

Parameters

value System.Nullable<BlendMode>

The value to set.

Implements SetBlendMode(Nullable<BlendMode>)

Returns

System.Threading.Tasks.Task

GraphicsLayer.SetEffect(Effect) Method

Asynchronously set the value of the Effect property after render.

public System.Threading.Tasks.Task SetEffect(dymaptic.GeoBlazor.Core.Model.Effect? value);

Parameters

value Effect

The value to set.

Implements SetEffect(Effect)

Returns

System.Threading.Tasks.Task

GraphicsLayer.SetElevationInfo(GraphicsLayerElevationInfo) Method

Asynchronously set the value of the ElevationInfo property after render.

public System.Threading.Tasks.Task SetElevationInfo(dymaptic.GeoBlazor.Core.Components.GraphicsLayerElevationInfo? value);

Parameters

value GraphicsLayerElevationInfo

The value to set.

Returns

System.Threading.Tasks.Task

GraphicsLayer.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.

Implements SetMaxScale(Nullable<double>)

Returns

System.Threading.Tasks.Task

GraphicsLayer.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.

Implements SetMinScale(Nullable<double>)

Returns

System.Threading.Tasks.Task

GraphicsLayer.SetScreenSizePerspectiveEnabled(Nullable) Method

Asynchronously set the value of the ScreenSizePerspectiveEnabled property after render.

public System.Threading.Tasks.Task SetScreenSizePerspectiveEnabled(System.Nullable<bool> value);

Parameters

value System.Nullable<System.Boolean>

The value to set.

Returns

System.Threading.Tasks.Task

GraphicsLayer.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

System.Threading.Tasks.Task

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.

GraphicsLayer.ValidateRequiredChildren() Method

When a MapView is prepared to render, this will check to make sure that all properties with the RequiredPropertyAttribute are provided.

public override void ValidateRequiredChildren();

Implements ValidateRequiredChildren()

Exceptions

MissingRequiredChildElementException
The consumer needs to provide the missing child component

MissingRequiredOptionsChildElementException
The consumer needs to provide ONE of the options of child components

GraphicsLayer.ValidateRequiredGeneratedChildren() Method

Validates source-generated child components.

public override void ValidateRequiredGeneratedChildren();

Implements ValidateRequiredGeneratedChildren()