layout: default title: GraphicsLayer parent: Core Classes —

dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Components.Layers

GraphicsLayer Class

A GraphicsLayer contains one or more client-side Graphics. Each graphic in the GraphicsLayer is rendered in a
LayerView inside either a SceneView or a MapView. The graphics contain discrete vector geometries that represent
real-world phenomena.
ArcGIS Maps SDK for JavaScript

public class GraphicsLayer : dymaptic.GeoBlazor.Core.Components.Layers.Layer

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

Constructors

GraphicsLayer() Constructor

Parameterless constructor for use as a razor component

public GraphicsLayer();

GraphicsLayer(IReadOnlyCollection, string, Nullable, Nullable, Nullable, Nullable, Nullable, Nullable, Nullable, Nullable) Constructor

Constructor for use in code

public GraphicsLayer(System.Collections.Generic.IReadOnlyCollection<dymaptic.GeoBlazor.Core.Components.Layers.Graphic>? graphics=null, string? title=null, System.Nullable<double> opacity=null, System.Nullable<bool> visible=null, System.Nullable<dymaptic.GeoBlazor.Core.Components.Layers.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.Components.Layers.BlendMode> blendMode=null);

Parameters

graphics System.Collections.Generic.IReadOnlyCollection<Graphic>

A collection of Graphics in the layer.

title System.String

The title of the layer used to identify it in places such as the Legend and LayerList widgets.

opacity System.Nullable<System.Double>

The opacity of the layer.

visible System.Nullable<System.Boolean>

Indicates if the layer is visible in the View. When false, the layer may still be added to a Map instance that is
referenced in a view, but its features will not be visible in the view.

listMode System.Nullable<ListMode>

Indicates how the layer should display in the LayerList widget. The possible values are listed below.

persistenceEnabled System.Nullable<System.Boolean>

Indicates if the layer will allow the client to save the layer’s state to local storage.

minScale System.Nullable<System.Double>

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

maxScale System.Nullable<System.Double>

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

screenSizePerspectiveEnabled System.Nullable<System.Boolean>

Indicates if the layer will display in a perspective view in a SceneView.

blendMode System.Nullable<BlendMode>

Blend modes are used to blend layers together to create an interesting effect in a layer

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.Components.Layers.BlendMode> BlendMode { get; set; }

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.Components.Layers.Effect? Effect { get; set; }

Property Value

Effect

GraphicsLayer.Graphics Property

A collection of Graphics in the layer.

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

Property Value

System.Collections.Generic.IReadOnlyCollection<Graphic>

GraphicsLayer.LayerType Property

Used internally to identify the sub type of Layer

public override string LayerType { get; }

Property Value

System.String

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; }

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; }

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>

Methods

GraphicsLayer.Add(Graphic) Method

Add a graphic to the current layer

public System.Threading.Tasks.Task Add(dymaptic.GeoBlazor.Core.Components.Layers.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.Layers.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.Clear() Method

Removes all graphics from the current layer

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

Returns

System.Threading.Tasks.Task

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

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.Layers.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.Layers.Graphic graphic);

Parameters

graphic Graphic

The graphic to remove

Returns

System.Threading.Tasks.Task

GraphicsLayer.Remove(IEnumerable) Method

Removes a set of graphics from the current layer

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

Parameters

graphics System.Collections.Generic.IEnumerable<Graphic>

The graphics to remove

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.