当前位置: 首页>>代码示例>>C#>>正文


C# ESRI.DirectlyOver方法代码示例

本文整理汇总了C#中ESRI.DirectlyOver方法的典型用法代码示例。如果您正苦于以下问题:C# ESRI.DirectlyOver方法的具体用法?C# ESRI.DirectlyOver怎么用?C# ESRI.DirectlyOver使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ESRI的用法示例。


在下文中一共展示了ESRI.DirectlyOver方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MyMap_MapGesture

        private void MyMap_MapGesture(object sender, ESRI.ArcGIS.Client.Map.MapGestureEventArgs e)
        {
            if (e.Gesture == GestureType.Tap)
            {
                FeatureLayer featureLayer = MyMap.Layers["MyFeatureLayer"] as FeatureLayer;
                IEnumerable<Graphic> selected = e.DirectlyOver(10,  new GraphicsLayer[] { featureLayer });
                foreach (Graphic g in selected)
                {
                    MyInfoWindow.Anchor = e.MapPoint;
                    MyInfoWindow.IsOpen = true;
                    //Since a ContentTemplate is defined (in XAML), Content will define the DataContext for the ContentTemplate
                    MyInfoWindow.Content = g;
                    return;
                }

                InfoWindow window = new InfoWindow()
                {
                    Anchor = e.MapPoint,
                    Padding = new Thickness(3),
                    Map = MyMap,
                    IsOpen = true,
                    Placement = InfoWindow.PlacementMode.Auto,
                    ContentTemplate = LayoutRoot.Resources["LocationInfoWindowTemplate"] as System.Windows.DataTemplate,
                    //Since a ContentTemplate is defined, Content will define the DataContext for the ContentTemplate
                    Content = new ESRI.ArcGIS.Client.Geometry.MapPoint(
                        double.Parse(e.MapPoint.X.ToString("0.000")),
                        double.Parse(e.MapPoint.Y.ToString("0.000")))
                };
                LayoutRoot.Children.Add(window);
            }
        }
开发者ID:jorik041,项目名称:arcgis-samples-winphone,代码行数:31,代码来源:InfoWindowSimple.xaml.cs

示例2: MyMap_MapGesture

 private void MyMap_MapGesture(object sender, ESRI.ArcGIS.Client.Map.MapGestureEventArgs e)
 {
     if (e.Gesture == GestureType.Hold)
     {
         FeatureLayer featureLayer = MyMap.Layers["MyFeatureLayer"] as FeatureLayer;
         IEnumerable<Graphic> selected = e.DirectlyOver(10, new GraphicsLayer[] { featureLayer });
         foreach (Graphic g in selected)
         {
             MyInfoWindow.Anchor = e.MapPoint;
             MyInfoWindow.IsOpen = true;
             MyInfoWindow.Content = g;
             return;
         }
     }
     else if (e.Gesture == GestureType.Tap)
         MyInfoWindow.IsOpen = false;
 }
开发者ID:Esri,项目名称:arcgis-samples-winphone,代码行数:17,代码来源:FeatureLayerOnDemand.xaml.cs

示例3: MyMap_MapGesture

        private void MyMap_MapGesture(object sender, ESRI.ArcGIS.Client.Map.MapGestureEventArgs e)
        {
            if (e.Gesture == GestureType.Tap && !MyDrawObject.IsEnabled)
            {
                MyInfoWindow.IsOpen = false;

                GraphicsLayer pointsGraphicsLayer = MyMap.Layers["MyPointGraphicsLayer"] as GraphicsLayer;
                GraphicsLayer polygonsGraphicsLayer = MyMap.Layers["MyPolygonGraphicsLayer"] as GraphicsLayer;
                IEnumerable<Graphic> selected = e.DirectlyOver(10, new GraphicsLayer[] { pointsGraphicsLayer, polygonsGraphicsLayer });
                foreach (Graphic g in selected)
                {
                    MyInfoWindow.Anchor = e.MapPoint;
                    MyInfoWindow.IsOpen = true;
                    MyInfoWindow.Content = g;
                    return;
                }
            }
        }
开发者ID:Esri,项目名称:arcgis-samples-winphone,代码行数:18,代码来源:Relation.xaml.cs


注:本文中的ESRI.DirectlyOver方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。