Share via


FindFilter.PropertyNames Property

FindFilter.PropertyNames Property

An array of strings representing the property names (EntityProperty.Name property) of the selected entity type that the results returned from the point-of-interest and polygon find methods must match.


Public PropertyNames As System.String


[C#]

public System.String PropertyNames;

Remarks

  • Valid array size is 0 through 75.

  • If the PropertyNames property is null, all properties are returned in the order defined in the data source.

  • If the PropertyNames property is not null, properties are returned in the order of the array.

  • The value of the PropertyNames property must match the EntityProperty.Name property exactly; otherwise, a SOAP fault is returned. This propety is not case sensitive.

Example

[Visual Basic]

Dim findServiceSoap As FindServiceSoap = New FindServiceSoap
    findServiceSoap.Credentials = _
        New NetworkCredential(myMapPointUserId, mySecurePassword)

    Dim strs As String() = New String() {"Manager"}
    Dim sortPropertys As SortProperty() = New SortProperty() {New SortProperty}
    sortPropertys(0).PropertyName = "Manager"
    sortPropertys(0).Direction = SortDirection.Descending
    Dim findNearbySpecification As FindNearbySpecification = New FindNearbySpecification
    findNearbySpecification.DataSourceName = "MapPoint.FourthCoffeeSample"
    findNearbySpecification.Distance = 1.0
    findNearbySpecification.LatLong = New LatLong
    findNearbySpecification.LatLong.Latitude = 47.6
    findNearbySpecification.LatLong.Longitude = -122.33
    findNearbySpecification.Filter = New FindFilter
    findNearbySpecification.Filter.EntityTypeName = "FourthCoffeeShops"
    findNearbySpecification.Filter.PropertyNames = strs
    findNearbySpecification.Filter.SortProperties = sortPropertys
    Dim findResults As FindResults = findServiceSoap.FindNearby(findNearbySpecification)



[C#]

FindServiceSoap findService = new FindServiceSoap();
   findService.Credentials = 
    new System.Net.NetworkCredential(myMapPointUserId, mySecurePassword);

   string[] returnProperties = new string[1];
   returnProperties[0] = "Manager";

   //Specify what properties to be used to sort the found results
   SortProperty[] sortproperties = new SortProperty[1];
   sortproperties[0] = new SortProperty();
   //Assign the property name to be sorted on
   sortproperties[0].PropertyName = "Manager";
   //Specify the sort direction: Ascending or Descending
   sortproperties[0].Direction = SortDirection.Descending;


   FindNearbySpecification findNearbySpec  = new FindNearbySpecification();
   findNearbySpec.DataSourceName = "MapPoint.FourthCoffeeSample";
   findNearbySpec.Distance = 1;
   findNearbySpec.LatLong = new LatLong();
   findNearbySpec.LatLong.Latitude = 47.6;
   findNearbySpec.LatLong.Longitude = -122.33;
   findNearbySpec.Filter = new FindFilter();
   findNearbySpec.Filter.EntityTypeName = "FourthCoffeeShops";
   findNearbySpec.Filter.PropertyNames = returnProperties;

   //Assign the sort property list to the 
   //find nearby specification filter object
   findNearbySpec.Filter.SortProperties = sortproperties;

   FindResults foundResults;
   foundResults = findService.FindNearby(findNearbySpec);


See Also

  FindFilter Class   |   EntityProperty.Name Property   |   FindServiceSoap Class