Location Class
Contains the altitude and coordinate values of a location on the map.
Namespace: Microsoft.Maps.MapControl.WPF
Assembly: Microsoft.Maps.MapControl.WPF (in Microsoft.Maps.MapControl.WPF.dll)
Inheritance Hierarchy
System.Object
Microsoft.Maps.MapControl.WPF.Location
Syntax
[TypeConverterAttribute(typeof(LocationConverter))]
public class Location : IFormattable
[TypeConverterAttribute((LocationConverter^::typeid))]
public ref class Location : IFormattable
[<TypeConverterAttribute(typeof(LocationConverter))>]
type Location =
class
interface IFormattable
end
<TypeConverterAttribute(GetType(LocationConverter))>
Public Class Location
Implements IFormattable
Constructors
Name | Description | |
---|---|---|
Location() | Initializes a new instance of the Location structure. |
|
Location(Double, Double) | Initializes a new instance of the Location structure using the given latitude and longitude values. |
|
Location(Double, Double, Double) | Initializes a new instance of the Microsoft.Maps.MapControl.WPF.Location structure using the given latitude, longitude and altitude values. |
|
Location(Double, Double, Double, AltitudeReference) | Initializes a new instance of the Microsoft.Maps.MapControl.WPF.Location structure using the given latitude, longitude, altitude and altitude reference values. |
|
Location(Location) | Initializes a new instance of the Location structure using the given location. |
Properties
Name | Description | |
---|---|---|
Altitude | Gets or sets altitude for a location. |
|
AltitudeReference | Gets or sets the reference plane used to measure the altitude. |
|
Latitude | Gets or sets the latitude of the location. |
|
Longitude | Gets or sets the longitude of the location. |
Methods
Name | Description | |
---|---|---|
Equals(Object) | Determines whether this location is the same as the given object.(Overrides Object.Equals(Object).) |
|
Finalize() | (Inherited from Object.) |
|
GetHashCode() | Retrieves the hash code for this location.(Overrides Object.GetHashCode().) |
|
GetType() | (Inherited from Object.) |
|
MemberwiseClone() | (Inherited from Object.) |
|
NormalizeLongitude(Double) | Converts an invalid longitude value to be within the valid range, which is -180 to 180. |
|
ToString() | Converts the location to a formatted string containing the latitude, longitude, and altitude values.(Overrides Object.ToString().) |
|
ToString(IFormatProvider) | Converts the location to a formatted string containing the latitude, longitude, and altitude values using the specified format provider. |
Fields
Name | Description | |
---|---|---|
MaxLatitude | Specifies the maximum latitude in degrees. |
|
MaxLongitude | Specifies the maximum longitude in degrees. |
|
MinLatitude | Specifies the minimum latitude in degrees. |
|
MinLongitude | Specifies the minimum longitude in degrees. |
Operators
Name | Description | |
---|---|---|
Equality(Location, Location) | Determines whether two instances of Location are equal. |
|
Inequality(Location, Location) | Determines whether two instances of Location are not equal. |
Explicit Interface Implementations
Name | Description | |
---|---|---|
IFormattable.ToString(String, IFormatProvider) |
Remarks
If the specified values of Latitude and Longitude are not within the range of valid values for these properties, they are converted to valid values. The range of valid values for Latitude is -90 to 90. The range of valid values for Longitude is -180 to 180.
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
Microsoft.Maps.MapControl.WPF Namespace
Return to top