MeasureMapTool¶
Namespace: ThinkGeo.UI.Blazor
Provides interactive measuring capabilities for a MapView, streaming results back to .NET.
public class MeasureMapTool : MapTool, Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleEvent, Microsoft.AspNetCore.Components.IHandleAfterRender
Inheritance Object → ComponentBase → MapTool → MeasureMapTool
Implements IComponent, IHandleEvent, IHandleAfterRender
Properties¶
Measured¶
public EventCallback<MeasuredMeasureToolEventArgs> Measured { get; set; }
Property Value¶
EventCallback<MeasuredMeasureToolEventArgs>
MeasuredFeatures¶
Gets the collection of measurement features that have been produced on the client.
public GeoCollection<Feature> MeasuredFeatures { get; set; }
Property Value¶
GeoCollection<Feature>
MeasureType¶
public MeasureType MeasureType { get; set; }
Property Value¶
Id¶
Gets or sets the unique identifier used to track this tool. Defaults to a new GUID.
public string Id { get; set; }
Property Value¶
Constructors¶
MeasureMapTool()¶
Initializes a new instance of the MeasureMapTool class and wires up server-side cleanup handlers.
public MeasureMapTool()
Methods¶
InitAsync()¶
Creates the client-side measure tool the first time the component renders.
protected Task InitAsync()
Returns¶
Task
A task that completes once the tool has been added or updated in the browser.
SetParametersAsync(ParameterView)¶
Clears the change-tracking flag prior to applying updated parameters.
public Task SetParametersAsync(ParameterView parameters)
Parameters¶
parameters ParameterView
New parameters supplied by the framework.
Returns¶
Task
A task that completes when parameter processing has finished.
ShouldRender()¶
Determines whether the component should re-render. The tool only re-renders when configuration changes need to be propagated to the client.
protected bool ShouldRender()
Returns¶
Boolean
true when pending changes exist; otherwise, false.
OnInitialized()¶
Registers the tool with the parent MapView before the first render.
protected void OnInitialized()
OnAfterRenderAsync(Boolean)¶
Applies pending client updates before deferring to the base lifecycle method.
protected Task OnAfterRenderAsync(bool firstRender)
Parameters¶
firstRender Boolean
Indicates whether this is the first render of the component.
Returns¶
Task
A task that completes after client updates and base processing run.