GeoFence(ListGeoFencePoint) Constructor

Create a GeoFence using a list of points. A GeoFence can be either a series of lines or polygons.

Definition

Namespace: CoordinateSharp
Assembly: CoordinateSharp (in CoordinateSharp.dll) Version: 3.1.1.1
XMLNS for XAML: Not mapped to an xmlns.
C#
public GeoFence(
	List<GeoFencePoint> points
)

Parameters

points  ListGeoFencePoint
List of points

Example

The following example creates a square in the USA using lat/long points.
C#
List<GeoFence.Point> points = new List<GeoFence.Point>();

//Points specified manually to create a square in the USA.
//First and last points should be identical if creating a polygon boundary.
points.Add(new GeoFence.Point(31.65, -106.52));
points.Add(new GeoFence.Point(31.65, -84.02));
points.Add(new GeoFence.Point(42.03, -84.02));
points.Add(new GeoFence.Point(42.03, -106.52));
points.Add(new GeoFence.Point(31.65, -106.52));

See Also