Exemple #1
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);
 }
Exemple #2
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);
         }
 }