Location class

Location class

Bing
 

Contains the coordinate values of a location on the map.

Definition

Description

Location()

Initializes a new instance of the Location class with latitude and longitude values set to 0,0.

Location(double latitude, double longitude)

Initializes a new instance of the Location class using the specified latitude and longitude values.

Location(Location other)

Creates a copy of the specified Location.

Name

Type

Description

Latitude

double

Gets or sets the latitude of the location as degrees of latitude.

Longitude

double

Gets or sets the longitude of the location as degrees of longitude.

Name

Definition

Return Type

Description

NormalizeLongitude

NormalizeLongitude(double longitude)

double

Converts a longitude value in degrees to be in the range [-180,180].

Set the center of the map.

<bm:Map>
  <bm:Map.Center>
    <bm:Location Latitude="46.227480" Longitude="-122.192955" />
  </bm:Map.Center>
</bm:Map>
myMap.Center = new Location(46.227480,-122.192955);
Show:
© 2016 Microsoft