Show / Hide Table of Contents

Method StartAsync

StartAsync(SketchCreationMode, Boolean)

Starts to draw geometry based on specified SketchCreationMode and proceeds to edit geometry with the SketchEditConfiguration that the geometry supports; unless, optional drawAndEdit parameter is false, then sketch is complete once geometry is drawn.

Declaration
public Task<Geometry> StartAsync(SketchCreationMode creationMode, bool drawAndEdit = true)
Parameters
Type Name Description
SketchCreationMode creationMode

Determines the type of geometry and how it will be created.

Boolean drawAndEdit

Optional parameter that indicates whether to proceed to edit. If false, sketch will complete once drawn.

Returns
Type Description
System.Threading.Tasks.Task<Geometry>

A task that represents the asynchronous sketching of geometry. The value of the task result is a Geometry object.

Remarks

Each time one of the StartAsync methods is called on the SketchEditor, it creates a default SketchEditConfiguration with parameters that make sense for that particular shape (e.g. circles are scaled in an aspect-ratio-preserving way, but ellipses are not). The intended use of the EditConfiguration property is to override these defaults after each StartAsync call, to modify the defaults based on context. You can use any one of the StartAsync overloaded methods which accepts a SketchEditConfiguration parameter, or modify the EditConfiguration after calling StartAsync.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.0 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 100.15
Relevant samples
Create and save KML file: Construct a KML document and save it as a KMZ file.
Find service area: Find the service area within a network from a given point.
Geodatabase transactions: Use transactions to manage how changes are committed to a geodatabase.
Sketch on map: Use the Sketch Editor to edit or sketch a new point, line, or polygon geometry on to a map.

StartAsync(SketchCreationMode, SketchEditConfiguration)

Starts to draw geometry based on specified SketchCreationMode and proceeds to edit geometry with the specified SketchEditConfiguration.

Declaration
public Task<Geometry> StartAsync(SketchCreationMode creationMode, SketchEditConfiguration editConfiguration)
Parameters
Type Name Description
SketchCreationMode creationMode

Determines the type of geometry and how it will be created.

SketchEditConfiguration editConfiguration

Defines which edit capabilities will be enabled.

Returns
Type Description
System.Threading.Tasks.Task<Geometry>

A task that represents the asynchronous sketching of geometry. The value of the task result is a Geometry object.

Remarks

Each time one of the StartAsync methods is called on the SketchEditor, it creates a default SketchEditConfiguration with parameters that make sense for that particular shape (e.g. circles are scaled in an aspect-ratio-preserving way, but ellipses are not). The intended use of the EditConfiguration property is to override these defaults after each StartAsync call, to modify the defaults based on context. You can use any one of the StartAsync overloaded methods which accepts a SketchEditConfiguration parameter, or modify the EditConfiguration after calling StartAsync.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.0 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 100.15

StartAsync(Geometry)

Starts to edit Geometry based on the SketchEditConfiguration that the geometry supports.

Declaration
public Task<Geometry> StartAsync(Geometry geometry)
Parameters
Type Name Description
Geometry geometry

The geometry to edit.

Returns
Type Description
System.Threading.Tasks.Task<Geometry>

A task that represents the asynchronous sketching of geometry. The value of the task result is a Geometry object.

Remarks

Each time one of the StartAsync methods is called on the SketchEditor, it creates a default SketchEditConfiguration with parameters that make sense for that particular shape (e.g. circles are scaled in an aspect-ratio-preserving way, but ellipses are not). The intended use of the EditConfiguration property is to override these defaults after each StartAsync call, to modify the defaults based on context. You can use any one of the StartAsync overloaded methods which accepts a SketchEditConfiguration parameter, or modify the EditConfiguration after calling StartAsync.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.0 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 100.15
Relevant samples
Sketch on map: Use the Sketch Editor to edit or sketch a new point, line, or polygon geometry on to a map.

StartAsync(Geometry, SketchCreationMode)

Starts to edit Geometry based on specified SketchCreationMode with the SketchEditConfiguration that the geometry supports.

Declaration
public Task<Geometry> StartAsync(Geometry geometry, SketchCreationMode creationMode)
Parameters
Type Name Description
Geometry geometry

The geometry to edit.

SketchCreationMode creationMode

Determines how geometry will be modified.

Returns
Type Description
System.Threading.Tasks.Task<Geometry>

A task that represents the asynchronous sketching of geometry. The value of the task result is a Geometry object.

Remarks

Each time one of the StartAsync methods is called on the SketchEditor, it creates a default SketchEditConfiguration with parameters that make sense for that particular shape (e.g. circles are scaled in an aspect-ratio-preserving way, but ellipses are not). The intended use of the EditConfiguration property is to override these defaults after each StartAsync call, to modify the defaults based on context. You can use any one of the StartAsync overloaded methods which accepts a SketchEditConfiguration parameter, or modify the EditConfiguration after calling StartAsync.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.0 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 100.15

StartAsync(Geometry, SketchCreationMode, SketchEditConfiguration)

Starts to edit Geometry based on specified SketchCreationMode and SketchEditConfiguration.

Declaration
public Task<Geometry> StartAsync(Geometry geometry, SketchCreationMode creationMode, SketchEditConfiguration editConfiguration)
Parameters
Type Name Description
Geometry geometry

The geometry to edit.

SketchCreationMode creationMode

Determines how geometry will be modified.

SketchEditConfiguration editConfiguration

Defines which edit capabilities will be enabled.

Returns
Type Description
System.Threading.Tasks.Task<Geometry>

A task that represents the asynchronous sketching of geometry. The value of the task result is a Geometry object.

Remarks

Each time one of the StartAsync methods is called on the SketchEditor, it creates a default SketchEditConfiguration with parameters that make sense for that particular shape (e.g. circles are scaled in an aspect-ratio-preserving way, but ellipses are not). The intended use of the EditConfiguration property is to override these defaults after each StartAsync call, to modify the defaults based on context. You can use any one of the StartAsync overloaded methods which accepts a SketchEditConfiguration parameter, or modify the EditConfiguration after calling StartAsync.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.0 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 100.15
In This Article
Back to top Copyright © 2022 Esri.