public void OnMouseUp(GeoAPI.Geometries.ICoordinate worldPosition, System.Windows.Forms.MouseEventArgs e) { if (AutoCurve) { newObjectIndex = -1; MapControl.MoveTool.OnMouseUp(worldPosition, e); } isBusy = false; }
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); }
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); //} }
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]); // } //} }
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); }
internal static Geometries.Point ToSharpMapPoint(NTSCoordinate coordinate) { return(new Geometries.Point(coordinate.X, coordinate.Y)); }
internal static Geometries.Point ToSharpMapPoint(NTSCoordinate coordinate) { return new Geometries.Point(coordinate.X, coordinate.Y); }
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; }
public void MouseUp(GeoAPI.Geometries.ICoordinate worldPos, MouseEventArgs imagePos) { }