dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Components.Geometries

Polygon Class

A polygon contains an array of rings and a spatialReference. Each ring is represented as an array of points. The
first and last points of a ring must be the same. A polygon also has boolean-valued hasM and hasZ fields.
ArcGIS JS API

public class Polygon : dymaptic.GeoBlazor.Core.Components.Geometries.Geometry,
System.IEquatable<dymaptic.GeoBlazor.Core.Components.Geometries.Polygon>

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

Implements System.IEquatable<Polygon>

Constructors

Polygon() Constructor

Parameterless constructor for use as a razor component

public Polygon();

Polygon(MapPath[], SpatialReference, Extent) Constructor

Creates a new polygon in code with parameters

public Polygon(dymaptic.GeoBlazor.Core.Objects.MapPath[] rings, dymaptic.GeoBlazor.Core.Components.Geometries.SpatialReference? spatialReference=null, dymaptic.GeoBlazor.Core.Components.Geometries.Extent? extent=null);

Parameters

rings MapPath[]

An array of MapPath rings.

spatialReference SpatialReference

The SpatialReference of the geometry.

extent Extent

The Extent of the geometry.

Properties

Polygon.Rings Property

An array of MapPath rings.

public dymaptic.GeoBlazor.Core.Objects.MapPath[] Rings { get; set; }

Property Value

MapPath[]

Polygon.Type Property

The Geometry “type”, used internally to render.

public override string Type { get; }

Property Value

System.String

Methods

Polygon.Clone() Method

Returns a deep clone of the geometry.

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

Returns

Polygon

Polygon.Equals(object) Method

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj);

Parameters

obj System.Object

The object to compare with the current object.

Returns

System.Boolean
true if the specified object is equal to the current object; otherwise, false.

Polygon.GetHashCode() Method

Serves as the default hash function.

public override int GetHashCode();

Returns

System.Int32
A hash code for the current object.

Operators

Polygon.operator ==(Polygon, Polygon) Operator

Override equality operator

public static bool operator ==(dymaptic.GeoBlazor.Core.Components.Geometries.Polygon? left, dymaptic.GeoBlazor.Core.Components.Geometries.Polygon? right);

Parameters

left Polygon

right Polygon

Returns

System.Boolean

Polygon.operator !=(Polygon, Polygon) Operator

Override inequality operator

public static bool operator !=(dymaptic.GeoBlazor.Core.Components.Geometries.Polygon? left, dymaptic.GeoBlazor.Core.Components.Geometries.Polygon? right);

Parameters

left Polygon

right Polygon

Returns

System.Boolean