Share via


GetInfoOptions.EntityTypesToReturn Property

GetInfoOptions.EntityTypesToReturn Property

The array of strings representing the names of the entity types (EntityType.Name[] property) for which location information should be returned. The default value is null.


Public EntityTypesToReturn As System.String()


[C#]

public System.String[] EntityTypesToReturn;

Remarks

  • If the IncludeAllEntityTypes property is True, the EntityTypesToReturn property is ignored.

  • 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 sources. For example, you may get better find results if you use the MapPoint.EU data source even though the MapPoint.World data source also contains information about European entities.

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 string[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   |   EntityType.Name Property   |   GetInfoOptions.IncludeAllEntityTypes Property   |   FindServiceSoap.GetLocationInfo Method   |   EntityType.Definition Property