ArcGISRuntime.UWP.Samples.IdentifyGraphics.IdentifyGraphics.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)
        {
            var tolerance = 10d; // Use larger tolerance for touch
            var maximumResults = 1; // Only return one graphic  
            var onlyReturnPopups = false; // Don't return only popups

            // Use the following method to identify graphics in a specific graphics overlay
            IdentifyGraphicsOverlayResult identifyResults = await MyMapView.IdentifyGraphicsOverlayAsync(
                 _polygonOverlay,
                 e.Position,
                 tolerance, 
                 onlyReturnPopups, 
                 maximumResults);

            // Check if we got results
            if (identifyResults.Graphics.Count > 0)
            { 
                //  Display to the user the identify worked.
                var message = new MessageDialog("Tapped on graphic", "").ShowAsync();
            }
        }
    }