ArcGISRuntime.WPF.Samples.IdentifyGraphics.IdentifyGraphics.OnMapViewTapped C# (CSharp) Метод

OnMapViewTapped() приватный Метод

private OnMapViewTapped ( object sender, GeoViewInputEventArgs e ) : void
sender object
e GeoViewInputEventArgs
Результат 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; // Return more than 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.
                MessageBox.Show("Tapped on graphic", "");
            }
        }
    }