I'm having an issue, I don't quite understand their C# API about Spatial filter.
This is what I managed to think of and found in forums:
void CreatePolygons()
{
ArcGISPolygonBuilder pb = new ArcGISPolygonBuilder(ArcGISSpatialReference.WGS84());
pb.AddPoint(21.130116, 55.663546, 1000);
pb.AddPoint(21.148544, 55.664257, 1000);
pb.AddPoint(21.180174, 55.645800, 1000);
pb.AddPoint(21.131820, 55.639522, 1000);
ArcGISPolygon polygon = pb.ToGeometry() as ArcGISPolygon;
// Create a list to hold polygons
ArcGISCollection<ArcGISPolygon> polygons = new ArcGISCollection<ArcGISPolygon>();
polygons.Add(polygon);
ArcGISSpatialFeatureFilter filter = new ArcGISSpatialFeatureFilter(polygons, ArcGISSpatialFeatureFilterSpatialRelationship.Disjoint);
//buildingLayer.FeatureFilter = filter;
Debug.Log("Drawed");
}
I don't know how to assign to layer. Because I made my map using their UI, not with code.
I managed to found the answer which worked for me.