async void GeometryTask_BufferCompleted(object sender, client.Tasks.GraphicsEventArgs e) { //check the result (the buffer polygon) //then pass to the query operation if (e.Results != null) { //There will be only one result client.Graphic buffer = e.Results[0]; //Then query for the features that intersect with the polygon await QueryForFeatures(buffer.Geometry); } }
/// <summary> /// Get the spatial query result (the buffer polygon) then use the polygon to search for the /// team features that intersect with it. /// Finally, show the team assignment page and select the teams nearby /// </summary> async void GeometryTask_BufferCompleted(object sender, client.Tasks.GraphicsEventArgs e) { if (e.Results != null) { //There will be only one result client.Graphic buffer = e.Results[0]; //Then query for the team features that intersect with the buffer polygon await QueryForFeatures(buffer.Geometry); #region Confirm team assignment and send SMS to the teams. //If the team data source doesn't have the phone number or the carrier field, we won't allowing sending SMS bool smsEnabled = (TeamDataSrc.Fields.Count(f => f.FieldName == "PhoneNumber" || f.FieldName == "Carrier") == 2) ? true : false; TeamAssignmentPage smsPage = new TeamAssignmentPage(SearchAreaName, TeamFeatureLayer, TeamsNearby, smsEnabled); smsPage.Show(); #endregion } }