GeoCoordinate Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Represents a location expressed as a geographic coordinate. The values exposed by this class use the WGS 84 standard.

Inheritance Hierarchy

System..::.Object
System.Device.Location..::.GeoCoordinate

Namespace: System.Device.Location
Assembly: System.Device (in System.Device.dll)
XMLNS for XAML: Not mapped to an xmlns.

Syntax

Public Class GeoCoordinate _
    Implements IEquatable(Of GeoCoordinate)
public class GeoCoordinate : IEquatable<GeoCoordinate>
<GeoCoordinate .../>

The GeoCoordinate type exposes the following members.

Constructors

Name Description
GeoCoordinate()()() Initializes a new instance of the GeoCoordinate class where the value of each field is not a number.
GeoCoordinate(Double, Double) Initializes a new instance of the GeoCoordinate class with the provided latitude and longitude.
GeoCoordinate(Double, Double, Double) Initializes a new instance of the GeoCoordinate class with the provided latitude, longitude, and altitude.
GeoCoordinate(Double, Double, Double, Double, Double, Double, Double) Initializes a new instance of the GeoCoordinate class with the provided latitude, longitude, altitude, accuracy, speed, and course.

Top

Properties

Name Description
Altitude Gets or sets the altitude of the GeoCoordinate in meters.
Course Gets or sets the heading in degrees, relative to true north. GeoCoordinate.
HorizontalAccuracy Gets or sets the horizontal accuracy of the GeoCoordinate, in meters.
IsUnknown Gets a value indicating whether the GeoCoordinate contains any geographic coordinate data.
Latitude Gets or sets the latitude of the GeoCoordinate.
Longitude Gets or sets the longitude of the GeoCoordinate.
Speed Gets the speed of the GeoCoordinate in meters per second.
VerticalAccuracy Gets or sets the vertical accuracy of the GeoCoordinate, in meters.

Top

Methods

Name Description
Equals(GeoCoordinate) Determines whether the specified GeoCoordinate has the same latitude and longitude values as this one.
Equals(Object) Determines whether the specified object is a GeoCoordinate that has the same latitude and longitude values as this one. (Overrides Object..::.Equals(Object).)
Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetDistanceTo Returns the calculated distance, in meters, from the current GeoCoordinate to the provided GeoCoordinate.
GetHashCode Returns a hash code for this instance. (Overrides Object..::.GetHashCode()()().)
GetType Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
ToString Returns a string representation of the current GeoCoordinate. (Overrides Object..::.ToString()()().)

Top

Operators

Name Description
Equality Determines whether two GeoCoordinate objects are equal.
Inequality Determines whether two GeoCoordinate objects are not equal.

Top

Fields

Name Description
Unknown Represents a GeoCoordinate that contains no data.

Top

Remarks

Capabilities

If you use this API in your app, you must specify the following capabilities in the app manifest. Otherwise, your app might not work correctly or it might exit unexpectedly.

ID_CAP_NETWORKING

Windows Phone 8, Windows Phone OS 7.1

ID_CAP_LOCATION

Windows Phone 8

For more info, see App capabilities and hardware requirements for Windows Phone 8.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Device.Location Namespace