ArcGISRuntimeXamarin.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; // Don't only return 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)
            {
                // Make sure that the UI changes are done in the UI thread
                RunOnUiThread(() =>
                {
                    var alert = new AlertDialog.Builder(this);
                    alert.SetMessage("Tapped on graphic");
                    alert.Show();
                });
            }
        }

Same methods

IdentifyGraphics::OnMapViewTapped ( object sender, Esri e ) : void