Exemplo n.º 1
0
 public void OnMouseUp(GeoAPI.Geometries.ICoordinate worldPosition, System.Windows.Forms.MouseEventArgs e)
 {
     if (AutoCurve)
     {
         newObjectIndex = -1;
         MapControl.MoveTool.OnMouseUp(worldPosition, e);
     }
     isBusy = false;
 }
Exemplo n.º 2
0
        internal static NTSLinearRing ToNTSLinearRing(Geometries.LinearRing geom,
                                                      IGeometryFactory factory)
        {
            NTSCoordinate[] coordinates = new NTSCoordinate[geom.NumPoints];
            int             index       = 0;

            foreach (Geometries.Point point in geom.Vertices)
            {
                coordinates[index++] = ToNTSCoordinate(point, factory);
            }
            return(factory.CreateLinearRing(coordinates) as NTSLinearRing);
        }
Exemplo n.º 3
0
        public void OnMouseDown(GeoAPI.Geometries.ICoordinate worldPosition, System.Windows.Forms.MouseEventArgs e)
        {
            //isBusy = true;

            //if ((-1 == newObjectIndex) || (AutoCurve))
            //{
            //    StartNewPolygon(worldPosition);
            //}
            //else
            //{
            //    SelectTool selectTool = MapControl.SelectTool;
            //    AppendCurvePoint((IPolygon)MapControl.SelectTool.MultiSelection[0].ClonedGeometry, worldPosition);
            //}
        }
Exemplo n.º 4
0
 public void OnMouseMove(GeoAPI.Geometries.ICoordinate worldPosition, System.Windows.Forms.MouseEventArgs e)
 {
     //if (-1 != newObjectIndex)
     //{
     //    IPolygon polygon = (IPolygon)MapControl.SelectTool.MultiSelection[0].ClonedGeometry;
     //    if (AutoCurve)
     //    {
     //        if (worldPosition.Distance(polygon.Coordinates[polygon.Coordinates.Length - 2]) > minDistance)
     //        {
     //            AppendCurvePoint(polygon, worldPosition);
     //        }
     //    }
     //    else
     //    {
     //        MapControl.SnapTool.AddSnap(polygon, polygon.Coordinates[polygon.Coordinates.Length - 2], worldPosition, polygon.Coordinates[polygon.Coordinates.Length - 1]);
     //    }
     //}
 }
Exemplo n.º 5
0
        public override void OnMouseDown(GeoAPI.Geometries.ICoordinate worldPosition, System.Windows.Forms.MouseEventArgs e)
        {
            // Starting a new measurement?
            if (pointGometries.Count >= 2)
            {
                Clear();
            }

            // Add the newly selected point
            pointGometries.Add(new GeoPoint(worldPosition));

            CalculateDistance();

            // Refresh the screen
            pointLayer.RenderRequired = true;
            MapControl.Refresh(); // HACK: Why is this needed? (Only RenderRequired = true isn't enough...)

            base.OnMouseDown(worldPosition, e);
        }
Exemplo n.º 6
0
 internal static Geometries.Point ToSharpMapPoint(NTSCoordinate coordinate)
 {
     return(new Geometries.Point(coordinate.X, coordinate.Y));
 }
Exemplo n.º 7
0
 internal static Geometries.Point ToSharpMapPoint(NTSCoordinate coordinate)
 {
     return new Geometries.Point(coordinate.X, coordinate.Y);
 }
Exemplo n.º 8
0
 internal static NTSLinearRing ToNTSLinearRing(Geometries.LinearRing geom,
     IGeometryFactory factory)
 {
     NTSCoordinate[] coordinates = new NTSCoordinate[geom.NumPoints];
     int index = 0;
     foreach (Geometries.Point point in geom.Vertices)
         coordinates[index++] = ToNTSCoordinate(point, factory);
     return factory.CreateLinearRing(coordinates) as NTSLinearRing;
 }
Exemplo n.º 9
0
 public void MouseUp(GeoAPI.Geometries.ICoordinate worldPos, MouseEventArgs imagePos)
 {
 }