Share via


CountryRegionInfo.LatLong Property

The latitude and longitude coordinates (LatLong object) of the country or region entity.

Public Dim LatLong As [Namespace].LatLong
    Member of [Namespace].CountryRegionInfo
[C#]
public [Namespace].LatLong LatLong
    Member of [Namespace].CountryRegionInfo

Example

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

'Get CountryRegionInfo for the United States
Dim entityIDs(0) As Integer
entityIDs(0) = 244
Dim myCountryRegionInfo() As CountryRegionInfo
myCountryRegionInfo = commonService.GetCountryRegionInfo(entityIDs)

'Output the information
Console.WriteLine(myCountryRegionInfo(0).FriendlyName)
Console.WriteLine(myCountryRegionInfo(0).EntityID.ToString())
Console.WriteLine(myCountryRegionInfo(0).Iso2)
Console.WriteLine(myCountryRegionInfo(0).Iso3)
Console.WriteLine(myCountryRegionInfo(0).OfficialName)
Console.WriteLine(myCountryRegionInfo(0).LatLong.Latitude.ToString() _
    + ", " + myCountryRegionInfo(0).LatLong.Longitude.ToString())

 
[C#]
//This example assumes that the service instance 
//'commonService' has already been created and that 
//the MapPoint Web Service namespace has been imported 
            
//Get CountryRegionInfo for the United States
int[] entityIDs= new int[1];
entityIDs[0] = 244;
CountryRegionInfo[] myCountryRegionInfo;
myCountryRegionInfo = commonService.GetCountryRegionInfo(entityIDs);

//Output the information
Console.WriteLine(myCountryRegionInfo[0].FriendlyName);
Console.WriteLine(myCountryRegionInfo[0].EntityID.ToString());
Console.WriteLine(myCountryRegionInfo[0].Iso2);
Console.WriteLine(myCountryRegionInfo[0].Iso3);
Console.WriteLine(myCountryRegionInfo[0].OfficialName);
Console.WriteLine(myCountryRegionInfo[0].LatLong.Latitude.ToString() 
    + ", " + myCountryRegionInfo[0].LatLong.Longitude.ToString());

 

See Also

CountryRegionInfo Class | LatLong Class