dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Components.Geometries

Polyline Class

A polyline contains an array of paths and spatialReference.
ArcGIS Maps SDK for JavaScript

public class Polyline : dymaptic.GeoBlazor.Core.Components.Geometries.Geometry

Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 Geometry 🡒 Polyline

Constructors

Polyline() Constructor

Parameterless constructor for use as a Razor Component.

public Polyline();

Polyline(IReadOnlyList, SpatialReference, Nullable, Nullable) Constructor

Constructor for use in C# code. Use named parameters (e.g., item1: value1, item2: value2) to set properties in any order.

public Polyline(System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Model.MapPath> paths, dymaptic.GeoBlazor.Core.Components.SpatialReference? spatialReference=null, System.Nullable<bool> hasM=null, System.Nullable<bool> hasZ=null);

Parameters

paths System.Collections.Generic.IReadOnlyList<MapPath>

An array of paths, or line segments, that make up the polyline.
ArcGIS Maps SDK for JavaScript

spatialReference SpatialReference

The spatial reference of the geometry.
default SpatialReference.WGS84 // wkid: 4326
ArcGIS Maps SDK for JavaScript

hasM System.Nullable<System.Boolean>

Indicates if the geometry has M values.
ArcGIS Maps SDK for JavaScript

hasZ System.Nullable<System.Boolean>

Indicates if the geometry has z-values (elevation).
ArcGIS Maps SDK for JavaScript

Properties

Polyline.Paths Property

An array of MapPath paths, or line segments, that make up the polyline.

public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Model.MapPath> Paths { get; set; }

Property Value

System.Collections.Generic.IReadOnlyList<MapPath>

Polyline.Type Property

The Geometry “type”, used internally to render.

public override dymaptic.GeoBlazor.Core.Enums.GeometryType Type { get; }

Property Value

GeometryType

Methods

Polyline.AddPath(IReadOnlyCollection) Method

Adds a path, or line segment, to the polyline.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Polyline?> AddPath(System.Collections.Generic.IReadOnlyCollection<dymaptic.GeoBlazor.Core.Components.Geometries.Point> points);

Parameters

points System.Collections.Generic.IReadOnlyCollection<Point>

A polyline path. This can either be defined as an array of Point geometries or an array of XY coordinates.

Returns

System.Threading.Tasks.Task<Polyline>

Polyline.Clone() Method

Returns a deep clone of the geometry.

public dymaptic.GeoBlazor.Core.Components.Geometries.Polyline Clone();

Returns

Polyline

Polyline.GetPoint(int, int) Method

Returns a point specified by a path and point in the path.
param pointIndex The index of a point in a path.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Point?> GetPoint(int pathIndex, int pointIndex);

Parameters

pathIndex System.Int32

The index of a path in the polyline.

pointIndex System.Int32

The index of a point in a path.

Returns

System.Threading.Tasks.Task<Point>

Polyline.InsertPoint(int, int, Point) Method

Inserts a new point into a polyline.
param pointIndex The index of the inserted point in the path.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Polyline?> InsertPoint(int pathIndex, int pointIndex, dymaptic.GeoBlazor.Core.Components.Geometries.Point point);

Parameters

pathIndex System.Int32

The index of the path in which to insert a point.

pointIndex System.Int32

The index of the inserted point in the path.

point Point

The point to insert.

Returns

System.Threading.Tasks.Task<Polyline>

Polyline.RemovePath(int) Method

Removes a path from the Polyline.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Point[]?> RemovePath(int index);

Parameters

index System.Int32

The index of the path to remove from the polyline.

Returns

System.Threading.Tasks.Task<Point[]>

Polyline.RemovePoint(int, int) Method

Removes a point from the polyline at the given pointIndex within the path identified by the given pathIndex.
param pointIndex The index of the point to be removed within the path.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Point?> RemovePoint(int pathIndex, int pointIndex);

Parameters

pathIndex System.Int32

The index of the path containing the point to be removed.

pointIndex System.Int32

The index of the point to be removed within the path.

Returns

System.Threading.Tasks.Task<Point>

Polyline.SetPoint(int, int, Point) Method

Updates a point in a polyline.
param pointIndex The index of the point to be updated in the path.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Polyline?> SetPoint(int pathIndex, int pointIndex, dymaptic.GeoBlazor.Core.Components.Geometries.Point point);

Parameters

pathIndex System.Int32

The index of the path that contains the point to be updated.

pointIndex System.Int32

The index of the point to be updated in the path.

point Point

Point geometry to update in the path.

Returns

System.Threading.Tasks.Task<Polyline>