${core_FeatureMouseButtonEventArgs_Title}

${core_FeatureMouseButtonEventArgs_Description}

Inheritance: FeatureMouseEventArgs
        //在地图中通过鼠标左键选择地物
        private void featuresLayer_MouseLeftButtonDown(object sender, FeatureMouseButtonEventArgs args)
        {
            //如果矢量已选中,再点击变为非选中状态;反之亦然
            args.Feature.Selected = !args.Feature.Selected;

            //FeatureDataGrid 移动到选中地物的记录
            if (args.Feature.Selected)
            {
                MyDataGrid.ScrollIntoView(args.Feature, null);
            }
            args.Handled = true;
        }
        void flayer_MouseLeftButtonDown(object sender, FeatureMouseButtonEventArgs e)
        {
            e.Feature.Selected = !e.Feature.Selected;
            //if (e.Feature.Selected)
            //{
            //    e.Feature.Style = SelectStyle;
            //}
            int i = 0;
            foreach (var item in flayer.Features)
            {
                if (item.Selected)
                { i++; }
            }

            System.Diagnostics.Debug.WriteLine("FeaturesLayer已经选中了: " + i + "个Feature");
        }
 //int flag4 = 1;
 void featuresLayer_MouseLeftButtonUp(object sender, FeatureMouseButtonEventArgs e)
 {
     //mytest4.Text = "featuresLayer_MouseLeftButtonUp" + flag4++.ToString();
 }
 void featuresLayer_MouseRightButtonUp(object sender, FeatureMouseButtonEventArgs e)
 {
 }
 void featuresLayer_MouseLeftButtonDown(object sender, FeatureMouseButtonEventArgs e)
 {
     mytest3.Text = "featuresLayer_MouseLeftButtonDown" + flag3++.ToString();
 }
Exemplo n.º 6
0
 private void virtualLayer_MouseLeftButtonUp(object sender , FeatureMouseButtonEventArgs args)
 {
     if (activeFeature != null && hoverCenterFeature != null && !startPoint.IsEmpty
         && startPoint != ( hoverCenterFeature.Geometry as GeoPoint ).Location)
     {
         OnGeometryEdit(activeFeature , GeometryEditAction.Moved);
     }//线要素移动
     else if (activeFeature != null && draggingVertex != null && startGeoPoint.IsEmpty)
     {
         OnGeometryEdit(activeFeature , GeometryEditAction.Moved);
     }//点要素移动
     else if (activeFeature != null && draggingVertex != null && !startGeoPoint.IsEmpty
         && ( startGeoPoint != ( draggingVertex.Geometry as GeoPoint ).Location ))
     {
         OnGeometryEdit(activeFeature , GeometryEditAction.VertexMoved);
         changeCenterFeatureLocation();
     }//线面顶点移动
     stopTracking();
     args.Handled = true;
 }
Exemplo n.º 7
0
 private void virtualLayer_MouseLeftButtonDown(object sender , FeatureMouseButtonEventArgs args)
 {
     args.Handled = true;
     Feature hoverFeature = args.Feature;
     if (hoverFeature == hoverCenterFeature)
     {
         prepareMoveLineOrRegionFeature(( hoverCenterFeature.Geometry as GeoPoint ).Location);
     }
     else
         if (hoverFeature.Geometry is GeoPoint)
         {
             prepareMovePointFeature(hoverFeature);
         }
         else if (hoverFeature.Geometry is GeoLine)
         {
             Point2D pMap = Map.ScreenToMap(args.GetPosition(Map));
             addOneVertex(hoverFeature , pMap);
         }
 }
Exemplo n.º 8
0
 private void editLayer_MouseLeftButtonUp(object sender , FeatureMouseButtonEventArgs args)
 {
     if (activeFeature != null && !startPoint.IsEmpty)
     {
         OnGeometryEdit(activeFeature , GeometryEditAction.Moved);
     }//面要素移动
     stopTracking();
     args.Handled = true;
 }
Exemplo n.º 9
0
 private void editLayer_MouseLeftButtonDown(object sender , FeatureMouseButtonEventArgs args)
 {
     Point point=args.GetPosition(Map);
     Point2D startGeoRegion = Map.ScreenToMap(point);
     if (args.Feature != null && args.Feature.Geometry is GeoPoint)
     {
         GeoPoint geo=args.Feature.Geometry as GeoPoint;
         Point featureP = Map.MapToScreen(new Point2D(geo.X, geo.Y));
         pointOffset = new Point(featureP.X - point.X, featureP.Y - point.Y);
     }
     args.Handled = true;
     Map.Focus();
     startEdit(args.Feature , false , startGeoRegion);
 }