Entity.ID Property
A unique identifier for a geographic entity. Integer.
Public Dim ID As Integer
Member of [Namespace].Entity
[C#]
public System.Int32 ID
Member of [Namespace].Entity
Remarks
- An ID property can be positive or negative. For MapPoint Web Service data sources, a positive ID property is persistent through different versions of the data source and can be considered a unique identifier that persists for an indefinite time. A negative ID property is unique for a data source within a given version and is not guaranteed to persist. Persistence allows an ID property to unambiguously represent a geographic entity. For example, the MapPoint Web Service ID property for the United States is 244; because it is a positive number, it persists across versions of the data source.
- If an entity exists in multiple MapPoint Web Service data sources and has a positive ID property, it is the same in all data sources. For example, the United States ID property is 244 in the MapPoint.BR, MapPoint.EU, MapPoint.NA, and MapPoint.World data sources.
- MapPoint Web Service customers may upload private data for use with the MapPoint Web Service. We suggest you follow the same protocol of using positive and negative numbers to reflect the state of persistence of the entity ID across versions of the data source, and that you use the same entity ID for entities that appear in more than one data source.
- For a table of MapPoint Web Service ID properties for country or regions, see CountryRegion Entity IDs.
- The ID property is contained within the FindResult.FoundLocation property returned from the Find, FindByID, FindByProperty, FindNearby, FindNearRoute and GetLocationInfo methods of the FindServiceSoap class.
Example
[Visual Basic]
'This example assumes that the service instance
''findService' has already been created and that
'the MapPoint Web Service namespace has been imported
'Output the EntityID of each found location
Dim findSpec As New FindSpecification()
findSpec.DataSourceName = "MapPoint.NA"
findSpec.InputPlace = "Seattle, WA"
findSpec.Options = New FindOptions()
findSpec.Options.ThresholdScore = 0
Dim foundResults As FindResults
foundResults = findService.Find(findSpec)
Console.WriteLine("Entity ID List")
Dim fr As FindResult
For Each fr In foundResults.Results
Console.WriteLine(fr.FoundLocation.Entity.DisplayName + ": " _
+ fr.FoundLocation.Entity.ID.ToString())
Next
[C#]
//This example assumes that the service instance
//'findService' has already been created and that
//the MapPoint Web Service namespace has been imported
//Output the Entity ID of each found location
FindSpecification findSpec = new FindSpecification();
findSpec.DataSourceName = "MapPoint.NA";
findSpec.InputPlace = "Seattle, WA";
findSpec.Options = new FindOptions();
findSpec.Options.ThresholdScore = 0;
FindResults foundResults;
foundResults = findService.Find(findSpec);
Console.WriteLine("Entity ID List");
foreach(FindResult fr in foundResults.Results)
{
Console.WriteLine(fr.FoundLocation.Entity.DisplayName + ": "
+ fr.FoundLocation.Entity.ID.ToString());
}
See Also
Entity Class | CountryRegion Entity IDs | FindResult.FoundLocation Property | FindServiceSoap.Find Method | FindServiceSoap.FindNearby Method | FindServiceSoap.GetLocationInfo Method