GetInfoOptions.IncludeAllEntityTypes Property

GetInfoOptions.IncludeAllEntityTypes Property

Indicates whether location information should be returned for all entity types. The default value is True.


Public IncludeAllEntityTypes As System.Boolean = True


[C#]

public System.Boolean IncludeAllEntityTypes;

Remarks

  • If location information is requested for entity types in addition to addresses, the entity type locations are returned after any locations with address information.

  • Location information can be returned for only certain entity types. For a table of the entity types by data source available for use with the FindServiceSoap.GetLocationInfo method, see MapPoint Data Sources.

  • A found location returned by the GetLocationInfo method does not include entity definition information. To get the EntityType.Definition property for a found location, use the CommonServiceSoap.GetEntityTypes method.

  • The availability of data for a particular entity type may vary between data source. For example, if searching for location information for the entity type "Neighborhood" for a latitude and longitude coordinate that you know is located in a European country or region, you get better results if you use the MapPoint.EU data source even though the MapPoint.World data source also contains neighborhood information.

Example

[Visual Basic]

'Output possible cities for a user at a specific latitude and longitude coordinate
Dim myLatLong As New LatLong()
myLatLong.Latitude = 47.682
myLatLong.Longitude = -122.132

Dim myEntityTypes(0)  As String
myEntityTypes(0) = "PopulatedPlace"

Dim myOptions As New GetInfoOptions()
myOptions.EntityTypesToReturn = myEntityTypes
myOptions.IncludeAllEntityTypes = False
myOptions.IncludeAddresses = False

Dim returnedLocations() As Location
returnedLocations = findService.GetLocationInfo(myLatLong, "MapPoint.NA", myOptions)

Dim i As Integer
For i = 0 To returnedLocations.Length - 1
 Console.WriteLine(returnedLocations(i).Entity.DisplayName)
Next



[C#]

//Output possible cities for a user at a specific latitude and longitude coordinate
LatLong myLatLong  = new LatLong();
myLatLong.Latitude = 47.682;
myLatLong.Longitude = -122.132;

string[] myEntityTypes = new EntityType[1];
myEntityTypes[0] = "PopulatedPlace";

GetInfoOptions myOptions  = new GetInfoOptions();
myOptions.EntityTypesToReturn = myEntityTypes;
myOptions.IncludeAllEntityTypes = false;
myOptions.IncludeAddresses = false;

Location[] returnedLocations = findService.GetLocationInfo(myLatLong, "MapPoint.NA", myOptions);

for(int i = 0; i < returnedLocations.Length; i++)
{
 Console.WriteLine(returnedLocations[i].Entity.DisplayName);
}


See Also

  GetInfoOptions Class   |   FindServiceSoap.GetLocationInfo Method   |   EntityType.Definition Property   |   CommonServiceSoap.GetEntityTypes Method