GeoBlazor Pro

dymaptic.GeoBlazor.Pro

dymaptic.GeoBlazor.Pro.Model

LabelGenerator Class

Helper class for generating default labels to be set on a layer’s binning or cluster configuration.
Bins: ArcGIS Maps SDK for JavaScriptClusters: ArcGIS Maps SDK for JavaScript

public class LabelGenerator : dymaptic.GeoBlazor.Pro.Model.ProLogicComponent

Inheritance System.Object 🡒 dymaptic.GeoBlazor.Core.Model.LogicComponent 🡒 ProLogicComponent 🡒 LabelGenerator

Constructors

LabelGenerator(AuthenticationManager, JsModuleManager, IAppValidator, IJSRuntime) Constructor

Constructor for use by Dependency Injection. Use AddGeoBlazorPro(this IServiceCollection, IConfiguration) in your startup code.

public LabelGenerator(dymaptic.GeoBlazor.Core.Model.AuthenticationManager authenticationManager, dymaptic.GeoBlazor.Core.JsModuleManager jsModuleManager, dymaptic.GeoBlazor.Core.IAppValidator appValidator, Microsoft.JSInterop.IJSRuntime jsRuntime);

Parameters

authenticationManager dymaptic.GeoBlazor.Core.Model.AuthenticationManager

jsModuleManager dymaptic.GeoBlazor.Core.JsModuleManager

appValidator dymaptic.GeoBlazor.Core.IAppValidator

jsRuntime Microsoft.JSInterop.IJSRuntime

Methods

LabelGenerator.GetBinLabelSchemes(Layer, string, Renderer) Method

The renderer to set on the input layer when clustering is enabled. Specify this parameter if the layer’s renderer does not match the renderer that will be used when clustering is enabled. This cannot be a HeatmapRenderer.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Model.LabelSchemes> GetBinLabelSchemes(dymaptic.GeoBlazor.Core.Components.Layers.Layer layer, string? field=null, dymaptic.GeoBlazor.Core.Components.Renderers.Renderer? renderer=null);

Parameters

layer dymaptic.GeoBlazor.Core.Components.Layers.Layer

The view where the input layer will be rendered.

field System.String

The name of the AggregateField to use in the primary label scheme. If not specified, then the label will be based on the aggregate count field.

renderer dymaptic.GeoBlazor.Core.Components.Renderers.Renderer

The renderer to set on layer.featureReduction.renderer when binning is enabled.

Returns

System.Threading.Tasks.Task<LabelSchemes>

LabelGenerator.GetClusterLabelSchemes(Layer, Guid, string, Renderer) Method

Generates default labelingInfo schemes to be set on a FeatureLayer’s featureReduction configuration. Returns one or more suggested LabelClasses for a given layer based on its renderer. It also returns a suggested clusterMinSize to ensure labels fit inside clusters.
If a renderer has a non-scale dependent SizeVariable, then the average value of the field or expression used to determine the cluster size will be suggested as the default label value. In all other scenarios, the suggested label will display the cluster count in the center of the label.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Model.LabelSchemes> GetClusterLabelSchemes(dymaptic.GeoBlazor.Core.Components.Layers.Layer layer, System.Guid viewId, string? field=null, dymaptic.GeoBlazor.Core.Components.Renderers.Renderer? renderer=null);

Parameters

layer dymaptic.GeoBlazor.Core.Components.Layers.Layer

The point layer that has or will have clustering enabled.

viewId System.Guid

The Id for the view where the input layer will be rendered.

field System.String

The name of the AggregateField to use in the primary label scheme. If not specified, then the label will be based on the data used to vary cluster size.

renderer dymaptic.GeoBlazor.Core.Components.Renderers.Renderer

The renderer to set on the input layer when clustering is enabled. Specify this parameter if the layer’s renderer does not match the renderer that will be used when clustering is enabled. This cannot be a HeatmapRenderer.

Returns

System.Threading.Tasks.Task<LabelSchemes>