Location.LatLong Property
Location.LatLong Property
The latitude and longitude coordinates (LatLong object) for a location or for the center point of the location if the location represents an area.
Public LatLong As LatLong
[C#]
public LatLong LatLong;
Remarks
If an Entity property is specified in the Location object (such as the entity "Washington state"), the LatLong property contains the latitude and longitude coordinates of the center point of the entity.
If the LatLong property conflicts with the Address property, the LatLong property takes precedence. If the LatLong conflicts with the Entity property, the Entity property takes precedence.
The LatLong property is required if both the Address and Entity properties are null.
Example
[Visual Basic]
'Output the LatLong property values of the find results
Dim findSpec As New FindSpecification()
findSpec.DataSourceName = "MapPoint.NA"
findSpec.InputPlace = "Seattle, WA"
Dim foundResults As FindResults
foundResults = findService.Find(findSpec)
Dim fr As FindResult
For Each fr In foundResults.Results
Console.WriteLine(fr.FoundLocation.LatLong.Latitude.ToString() _
+ ", " + fr.FoundLocation.LatLong.Longitude.ToString())
Next
[C#]
//Output the LatLong property values of the find results
FindSpecification findSpec = new FindSpecification();
findSpec.DataSourceName = "MapPoint.NA";
findSpec.InputPlace = "Seattle, WA";
FindResults foundResults;
foundResults = findService.Find(findSpec);
foreach(FindResult fr in foundResults.Results)
{
Console.WriteLine(fr.FoundLocation.LatLong.Latitude.ToString()
+ ", " + fr.FoundLocation.LatLong.Longitude.ToString());
}
See Also
Location Class | LatLong Class | Location.Entity Property | Location.Address Property