So I want to allow the user to create a connection between 2 polygons on my map. So it doesn't make sense to allow them to draw polyline with multi points.
Is there a way I can do something like below BUT ONLY with 1 start and 1 end point?
private IPolyline DrawLine(IActiveView activeView, int x, int y)
{
IPolyline line = null;
IRubberBand rubberBand = new RubberLineClass();
ISimpleLineSymbol simpleLineSymbol = new SimpleLineSymbolClass();
if (activeView != null)
line = rubberBand.TrackNew(activeView.ScreenDisplay, (ISymbol)simpleLineSymbol) as IPolyline;
return line;
}
But I don't want the user to have to double click at the last point, it could be confusing for user; I want them to click - create start point, click - create end point.