I have a set of unlabeled images which I need to present labeled and unlabeled. I have the label text and positions. I do not want to have two images (labeled and unlabeled); rather, I want to put the text over the image, either in relatively-positioned div
s or as SVG text elements using Raphaël, those being two approaches I'm technically comfortable with. The nature of the project dictates that the image and the labels be delivered to the browser as distinct resources.
Ideally the labels would include indicator lines as in this image (N.B. I'm aware that the labels are part of the image file in the example - I want my end result to look like this.)
I'm wondering if there is any reason to prefer one approach over the other (either div
s or SVG elements)? An existing javascript library for positioning labels would be a strong recommendation for either approach; otherwise I suppose drawing the indicator lines would be easier in SVG using Raphaël. jQuery and Raphaël are already available in the project.