ArcGISRuntime.UWP.Samples.AnalyzeViewshed.AnalyzeViewshed.OnMapViewTapped C# (CSharp) Method

OnMapViewTapped() private method

private OnMapViewTapped ( object sender, GeoViewInputEventArgs e ) : void
sender object
e GeoViewInputEventArgs
return void
        private async void OnMapViewTapped(object sender, GeoViewInputEventArgs e)
        {
            // The geoprocessing task is still executing, don't do anything else (i.e. respond to 
            // more user taps) until the processing is complete.
            if (_isExecutingGeoprocessing)
            {
                return;
            }

            // Indicate that the geoprocessing is running
            SetBusy();

            // Clear previous user click location and the viewshed geoprocessing task results
            _inputOverlay.Graphics.Clear();
            _resultOverlay.Graphics.Clear();

            // Create a marker graphic where the user clicked on the map and add it to the existing graphics overlay 
            Graphic myInputGraphic = new Graphic(e.Location);
            _inputOverlay.Graphics.Add(myInputGraphic);

            // Execute the geoprocessing task using the user click location 
            await CalculateViewshed(e.Location);
        }