EditOverlay¶
Namespace: ThinkGeo.UI.Blazor
public class EditOverlay : Overlay, Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleEvent, Microsoft.AspNetCore.Components.IHandleAfterRender, System.IDisposable, System.IAsyncDisposable
Inheritance object → ComponentBase → Overlay → EditOverlay
Implements IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IAsyncDisposable
Properties¶
Features¶
Gets a collection of features.
public GeoCollection<Feature> Features { get; }
Property Value¶
GeoCollection<Feature>
PointIconColumnName¶
Gets or sets the feature column name that stores the icon source for point features. When set, point features in this edit overlay are rendered with the image source from that column.
public string PointIconColumnName { get; set; }
Property Value¶
Remarks:
The column value should be an image URL or data URL. This setting only affects point features.
OnFeatureClick¶
Occurs when editing feature is clicked.
public EventCallback<FeatureClickedEditOverlayEventArgs> OnFeatureClick { get; set; }
Property Value¶
EventCallback<FeatureClickedEditOverlayEventArgs>
OnFeatureModified¶
Occurs when editing feature is modified.
public EventCallback<FeatureModifiedEditOverlayEventArgs> OnFeatureModified { get; set; }
Property Value¶
EventCallback<FeatureModifiedEditOverlayEventArgs>
OnFeatureDrawn¶
Occurs when feature is drawn.
public EventCallback<FeatureDrawnEditOverlayEventArgs> OnFeatureDrawn { get; set; }
Property Value¶
EventCallback<FeatureDrawnEditOverlayEventArgs>
TrackMode¶
Gets or sets the track mode of EditOverlay.
public BlazorTrackMode TrackMode { get; set; }
Property Value¶
FeatureStyle¶
Gets or sets the style for editing features.
public EditOverlayFeatureStyle FeatureStyle { get; set; }
Property Value¶
GeometryProjectionString¶
Gets or sets the projection string used when creating geometry metadata for edit events. When left unset, the overlay uses the built-in map projections for the current MapView.MapUnit: WGS84 for GeographyUnit.DecimalDegree maps and spherical Mercator for GeographyUnit.Meter maps. Set this when the map is using any other projection, including custom meter-based projections.
public string GeometryProjectionString { get; set; }
Property Value¶
Id¶
Gets or sets the unique identifier used to register this overlay with the map. Defaults to a new GUID.
public string Id { get; set; }
Property Value¶
IsVisible¶
Gets or sets a value indicating whether this overlay participates in draw requests. Defaults to true.
public bool IsVisible { get; set; }
Property Value¶
Constructors¶
EditOverlay()¶
public EditOverlay()
Methods¶
BuildRenderTree(RenderTreeBuilder)¶
protected void BuildRenderTree(RenderTreeBuilder __builder)
Parameters¶
__builder RenderTreeBuilder
Returns¶
AddFeature(BaseShape, string, IDictionary<string, string>)¶
Adds a shape to EditOverlay.Features for editing and returns the feature created for it.
public Feature AddFeature(BaseShape shape, string featureId, IDictionary<string, string> columnValues)
Parameters¶
shape BaseShape
The shape to edit.
featureId string
The id for the new feature; when left unset the feature keeps the shape's own id.
Pass the id here rather than assigning it on the returned feature, which is already registered
under its original id by the time this method returns.
columnValues IDictionary<string, string>
Optional column values for the new feature.
Returns¶
Feature
The feature that was added to .
Remarks:
Prefer this over Features.Add(new Feature(shape)) whenever the application starts from a shape. A Feature keeps its geometry as well-known binary, so a shape reaching EditOverlay.Features has already been flattened into one of the well-known geometry types. For a circular EllipseShape that loses the circle, and BlazorTrackMode.Modify then drags the resulting polygon's vertices one at a time instead of resizing the radius. This method reads the shape before the flattening happens.
A circle is the only shape the map can currently keep as itself, so that is the only case where this method differs from adding to EditOverlay.Features directly. It records the circle in the feature's column values under names starting with __tg_edit_: store those values along with the feature and it comes back as a circle, drop them and it comes back as a polygon.
SetParametersAsync(ParameterView)¶
public Task SetParametersAsync(ParameterView parameters)
Parameters¶
parameters ParameterView
Returns¶
InitializeAsyncCore()¶
protected Task InitializeAsyncCore()
Returns¶
RedrawAsync()¶
public Task RedrawAsync()
Returns¶
OnInitialized()¶
protected void OnInitialized()
Returns¶
OnAfterRenderAsync(bool)¶
protected Task OnAfterRenderAsync(bool firstRender)
Parameters¶
firstRender bool
Returns¶
ShouldRender()¶
protected bool ShouldRender()
Returns¶
A(InternalEditOverlayFeatureDrawnEventArgs)¶
internal Task A(InternalEditOverlayFeatureDrawnEventArgs )
Parameters¶
`InternalEditOverlayFeatureDrawnEventArgs`
Returns¶
ResolveGeometryProjectionString()¶
protected string ResolveGeometryProjectionString()
Returns¶
ReleaseAsyncCore()¶
protected Task ReleaseAsyncCore()