// the line connecting the segments
OMLine cLine = new OMLine(pt1.getLatitude(), pt1.getLongitude(), pt2.getLatitude(), pt2.getLongitude(), lineType);
// get the map projection
Projection proj = theMap.getProjection();
// prepare the line for rendering
cLine.generate(proj);
// render the line graphic
cLine.render(g);
}
}