ESRI.ArcGIS.Client.Toolkit.EditorWidget.Map_MapGesture C# (CSharp) Méthode

Map_MapGesture() private méthode

private Map_MapGesture ( object sender, Map e ) : void
sender object
e Map
Résultat void
        private void Map_MapGesture(object sender, Map.MapGestureEventArgs e)
        {
            if (!displayAttribute || editor == null || !editor.GraphicsLayers.Any(l => l is FeatureLayer))
                return;
            if (e.Gesture != GestureType.Tap)
                return;
            var featureLayers = from l in editor.GraphicsLayers
                                where l is FeatureLayer
                                select l as FeatureLayer;
            var graphics = e.DirectlyOver(TAP_TOLERANCE, featureLayers);
            if (graphics != null && graphics.GetEnumerator().MoveNext())
            {
                var graphic = graphics.First();
                FeatureLayer layer = null;
                if (graphic == null) return;
                foreach (var l in featureLayers)
                {
                    if (l.Graphics == null)
                        return;
                    if (l.Graphics.Contains(graphic))
                    {
                        layer = l;
                        break;
                    }
                }
                if (layer != null)
                {
                    e.Handled = true;
                    TemplatePicker.ShowAttributeForm(layer, graphic);
                    this.displayAttribute = this.Continuous;
                }
            }
        }