Share via


LatLong.Longitude Property

The longitude coordinate as a decimal degree value in World Geodetic System (WGS 84) datum. Double. Valid range is from –180.0 through +180.0.

Public Dim Longitude As Double = 0
    Member of [Namespace].LatLong
[C#]
public System.Double Longitude
    Member of [Namespace].LatLong

Example

 
[Visual Basic] 
'This example assumes that the service instance 
''routeService' has already been created and that 
'the MapPoint Web Service namespace has been imported 

'Calculate a route between two latitude and longitude coordinates
Dim latLongs(1) As LatLong
latLongs(0) = New LatLong()
latLongs(0).Latitude = 40
latLongs(0).Longitude = -120
latLongs(1) = New LatLong()
latLongs(1).Latitude = 41
latLongs(1).Longitude = -121

Dim myRoute As Route
myRoute = routeService.CalculateSimpleRoute(latLongs, "MapPoint.NA", SegmentPreference.Quickest)

 
[C#]
//This example assumes that the service instance 
//'routeService' has already been created and that 
//the MapPoint Web Service namespace has been imported 

//Calculate a route between two latitude and longitude coordinates
LatLong[] latLongs = new  LatLong[2];
latLongs[0] = new LatLong();
latLongs[0].Latitude = 40;
latLongs[0].Longitude = -120;
latLongs[1] = new LatLong();
latLongs[1].Latitude = 41;
latLongs[1].Longitude = -121;

Route myRoute = routeService.CalculateSimpleRoute(latLongs, "MapPoint.NA", SegmentPreference.Quickest);

 

See Also

LatLong Class