This class stores the coordinate information needed to mark locations on a map. The Location class consists of two properties: latitude and longitude.
The latitude property is used to represent how far north or south a location is. This value is an angle measured around the center of the earth from the equator towards the poles. A positive value is in the northern hemisphere and a negative value is in the southern hemisphere. This value has a range of -90 to 90 degrees however due to the mathematics involved in representing the spherical globe as a flat 2D map, some calculations approach infinity as you approach polar latitudes. To avoid this, Bing Maps and many other mapping platforms that use the Mercator projection system clip the latitude coordinates to approximately -85 and 85 degrees.
The longitude property stores the angle of horizontal offset from the prime meridian (0 degrees). This property has a value between -180 and 180 degrees.
Location(latitude: number, longitude: number)
||number||The latitude of the location.|
||number||The longitude of the location.|
The Location class has the following static methods.
|areEqual(loc1: Location, loc2: Location)||boolean||Determines if the specified Location objects are equal.|
||number||Normalizes the specified longitude so that it is between -180 and 180.|
||Location||Parses a location string of the form "lat,long".|
The Location class has the following methods.
||Location||Returns a copy of the Location object.|
||string||Converts the Location object to a string.|