Show / Hide Table of Contents

Struct Vector2dBounds

Represents a bounding box derived from a southwest corner and a northeast corner.

Namespace:Mapbox.Utils
Assembly:Mapbox.Utils.dll
Syntax
public struct Vector2dBounds

Constructors

Vector2dBounds(Vector2d, Vector2d)

Initializes a new instance of the Vector2dBounds struct.

Declaration
public Vector2dBounds(Vector2d sw, Vector2d ne)
Parameters
Type Name Description
Vector2d sw

Geographic coordinate representing southwest corner of bounding box.

Vector2d ne

Geographic coordinate representing northeast corner of bounding box.

Fields

NorthEast

Northeast corner of bounding box.

Declaration
public Vector2d NorthEast
Field Value
Type Description
Vector2d

SouthWest

Southwest corner of bounding box.

Declaration
public Vector2d SouthWest
Field Value
Type Description
Vector2d

Properties

Center

Gets or sets the central coordinate of the bounding box. When setting a new center, the bounding box will retain its original size.

Declaration
public Vector2d Center { get; set; }
Property Value
Type Description
Vector2d

The central coordinate.

East

Gets the east longitude.

Declaration
public double East { get; }
Property Value
Type Description
System.Double

The east longitude.

North

Gets the north latitude.

Declaration
public double North { get; }
Property Value
Type Description
System.Double

The north latitude.

South

Gets the south latitude.

Declaration
public double South { get; }
Property Value
Type Description
System.Double

The south latitude.

West

Gets the west longitude.

Declaration
public double West { get; }
Property Value
Type Description
System.Double

The west longitude.

Methods

Extend(Vector2d)

Extend the bounding box to contain the point.

Declaration
public void Extend(Vector2d point)
Parameters
Type Name Description
Vector2d point

A geographic coordinate.

Extend(Vector2dBounds)

Extend the bounding box to contain the bounding box.

Declaration
public void Extend(Vector2dBounds bounds)
Parameters
Type Name Description
Vector2dBounds bounds

A bounding box.

FromCoordinates(Vector2d, Vector2d)

Creates a bound from two arbitrary points. Contrary to the constructor, this method always creates a non-empty box.

Declaration
public static Vector2dBounds FromCoordinates(Vector2d a, Vector2d b)
Parameters
Type Name Description
Vector2d a

The first point.

Vector2d b

The second point.

Returns
Type Description
Vector2dBounds

The convex hull.

IsEmpty()

Whenever the geographic bounding box is empty.

Declaration
public bool IsEmpty()
Returns
Type Description
System.Boolean

true, if empty, false otherwise.

ToArray()

Converts to an array of doubles.

Declaration
public double[] ToArray()
Returns
Type Description
System.Double[]

An array of coordinates.

ToString()

Converts the Bbox to a URL snippet.

Declaration
public override string ToString()
Returns
Type Description
System.String

Returns a string for use in a Mapbox query URL.

World()

A bounding box containing the world.

Declaration
public static Vector2dBounds World()
Returns
Type Description
Vector2dBounds

The world bounding box.

Back to top Copyright © 2015-2016 Microsoft
Generated by DocFX