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
System_CAPS_pubmethod Location()

Initializes a new instance of the Location structure.

System_CAPS_pubmethod Location(Double, Double)

Initializes a new instance of the Location structure using the given latitude and longitude values.

System_CAPS_pubmethod Location(Double, Double, Double)

Initializes a new instance of the Microsoft.Maps.MapControl.WPF.Location structure using the given latitude, longitude and altitude values.

System_CAPS_pubmethod 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.

System_CAPS_pubmethod Location(Location)

Initializes a new instance of the Location structure using the given location.

Properties

Name Description
System_CAPS_pubproperty Altitude

Gets or sets altitude for a location.

System_CAPS_pubproperty AltitudeReference

Gets or sets the reference plane used to measure the altitude.

System_CAPS_pubproperty Latitude

Gets or sets the latitude of the location.

System_CAPS_pubproperty Longitude

Gets or sets the longitude of the location.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

Determines whether this location is the same as the given object.(Overrides Object.Equals(Object).)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

Retrieves the hash code for this location.(Overrides Object.GetHashCode().)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_static NormalizeLongitude(Double)

Converts an invalid longitude value to be within the valid range, which is -180 to 180.

System_CAPS_pubmethod ToString()

Converts the location to a formatted string containing the latitude, longitude, and altitude values.(Overrides Object.ToString().)

System_CAPS_pubmethod ToString(IFormatProvider)

Converts the location to a formatted string containing the latitude, longitude, and altitude values using the specified format provider.

Fields

Name Description
System_CAPS_pubfieldSystem_CAPS_static MaxLatitude

Specifies the maximum latitude in degrees.

System_CAPS_pubfieldSystem_CAPS_static MaxLongitude

Specifies the maximum longitude in degrees.

System_CAPS_pubfieldSystem_CAPS_static MinLatitude

Specifies the minimum latitude in degrees.

System_CAPS_pubfieldSystem_CAPS_static MinLongitude

Specifies the minimum longitude in degrees.

Operators

Name Description
System_CAPS_puboperatorSystem_CAPS_static Equality(Location, Location)

Determines whether two instances of Location are equal.

System_CAPS_puboperatorSystem_CAPS_static Inequality(Location, Location)

Determines whether two instances of Location are not equal.

Explicit Interface Implementations

Name Description
System_CAPS_pubinterfaceSystem_CAPS_privmethod 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