Use getDefaultMagnetPoint in Polyline.Edit