${core_FeaturePointerRoutedEventArgs_title}
Inheritance: System.EventArgs
示例#1
0
 private void editLayer_PointerPressed(object sender, FeaturePointerRoutedEventArgs args)
 {
     Point2D startGeoRegion = Map.ScreenToMap(args.GetCurrentPoint(Map).Position);
     args.Handler = true;
     Map.Focus(Windows.UI.Xaml.FocusState.Pointer);
     startEdit(args.Feature , false , startGeoRegion);
 }
示例#2
0
 private void editLayer_PointerReleased(object sender, FeaturePointerRoutedEventArgs args)
 {
     if (activeFeature != null && !startPoint.IsEmpty)
     {
         OnGeometryEdit(activeFeature , GeometryEditAction.Moved);
     }//面要素移动
     stopTracking();
     args.Handler = true;
 }
示例#3
0
 private void virtualLayer_PointerReleasedp(object sender, FeaturePointerRoutedEventArgs 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.Handler = true;
 }
示例#4
0
 private void virtualLayer_PointerPressed(object sender, FeaturePointerRoutedEventArgs args)
 {
     args.Handler = 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.GetCurrentPoint(Map).Position);
             addOneVertex(hoverFeature , pMap);
         }
 }
示例#5
0
 private void virtualLayer_PointerMoved(object sender, FeaturePointerRoutedEventArgs args)
 {
     Feature hoverFeature = args.Feature;
     //在虚拟线上,并且没遇到虚拟顶点 ,显示捕捉点
     if (draggingVertex == null && hoverFeature.Geometry is GeoLine)
     {
         GeoLine line = hoverFeature.Geometry as GeoLine;
         Point2D pMap = Map.ScreenToMap(args.GetCurrentPoint(Map).Position);
         Point2D snap = FindPointOnLineClosestToPoint(line.Parts[0][0] , line.Parts[0][1] , pMap);
         if (snapVertex == null)
         {
             snapVertex = new Feature() { Style = SnapStyle , Geometry = new GeoPoint(snap) };
             hoverLayer.Features.Add(snapVertex);
         }
         else
         {
             snapVertex.Geometry = new GeoPoint(snap);
         }
     }
 }
示例#6
0
 private void virtualLayer_PointerExited(object sender, FeaturePointerRoutedEventArgs args)
 {
     if (snapVertex != null)
     {
         hoverLayer.Features.Remove(snapVertex);
         snapVertex = null;
     }
 }
        private void flayer_MouseLeftButtonDown(object sender, FeaturePointerRoutedEventArgs args)
        {
            //如果矢量已选中,再点击变为非选中状态,反之亦然
            args.Feature.Selected = !args.Feature.Selected;

            args.Handler = true;
        }