Alerts On Lines

Is there a way to add alerts on drawn lines ?