FindPolygonSpecification.DataSourceName Property
FindPolygonSpecification.DataSourceName Property
A string representing the name of the data source (DataSource.Name property) in which to find the polygon.
Public DataSourceName As String
[C#]
public string DataSourceName;
Example
[Visual Basic]
'Set up the Address object and the specification object
'Create a FindPolygonSpecification and then call
'the FindPolygon method.
Dim findPolySpec As New FindPolygonSpecification
Dim filter As New LatLongSpatialFilter
filter.LatLong = New LatLong
filter.LatLong.Latitude = Convert.ToDouble(txtLatitude.Text)
filter.LatLong.Longitude = Convert.ToDouble(txtLongitude.Text)
Dim ff As New FindFilter
ff.EntityTypeName = "MyEntityName"
findPolySpec.SpatialFilter = filter
findPolySpec.DataSourceName = "MyDataSource"
findPolySpec.Filter = ff
Dim results As New FindResults
results = finder.FindPolygon(findPolySpec)
If results.NumberFound = 1 Then
lblCheckPoint.Text = "The specified point is in the polygon."
Else
lblCheckPoint.Text = "The specified point is not in the polygon."
End If
[C#]
//Create a FindPolygonSpecification and then call
//the FindPolygon method.
FindPolygonSpecification findPolySpec = new FindPolygonSpecification();
LatLongSpatialFilter filter = new LatLongSpatialFilter();
filter.LatLong = new LatLong();
filter.LatLong.Latitude = Convert.ToDouble(txtLatitude.Text);
filter.LatLong.Longitude = Convert.ToDouble(txtLongitude.Text);
FindFilter ff = new FindFilter();
ff.EntityTypeName = "MyEntityName";
findPolySpec.SpatialFilter= filter;
findPolySpec.DataSourceName="MyDataSource";
findPolySpec.Filter = ff;
FindResults results = finder.FindPolygon(findPolySpec);
if (results.NumberFound==1)
{
lblCheckPoint.Text="The specified point is in the polygon.";
}
else
{
lblCheckPoint.Text="The specified point is not in the polygon.";
}