SVG task - is it the right tool for the job?
July 13, 2007 11:14 AM   Subscribe

Resources/information on layering with SVG

I'm interested in working with SVG. I have some fairly intricate but simple vector (AI format) digitizations of some drawings I made. I'd like to display these on a webpage with a raster image of the original context 'beneath' the SVG image (does SVG do transparency?).

What is key is that the layers within the SVG (which I create as layers in Illustrator CS2 presumably) are clickable on/off and the raster itself is clickable on/off also - presumably using JavaScript.

Is this possible? Does anyone have any resources or information on how this could be accomplished? I can't find a great deal on the www about this aspect of SVG although similar projects have clearly been done - although that example doesn't have the raster background I am looking to achieve.

In addition it would be great if the layers could be searchable, perhaps through an XML sort/filter...

Any thoughts?
posted by dance to Computers & Internet (8 answers total)
 
SVG does support transparency. Will Javascript interact with it the way you want? Most Probably. Name your layers carefully and check this out.
posted by IronLizard at 11:54 AM on July 13, 2007


Let me rephrase that. The SVG specification supports transparency (Inkscape makes great use of it too) but browsers may not implement the entire SVG specification.
posted by IronLizard at 12:10 PM on July 13, 2007


Thanks IronLizard, I'll check that out.

It seems FireFox implements the specification natively and IE through a plugin?
posted by dance at 12:42 PM on July 13, 2007


Honestly, browser support for SVG is terrible, and it's going nowhere fast. If you want to make one red triangle move around: great, SVG can do that. If you want to do something complex: yes, the SVG spec allows it but no, you can't actually do it in any browser. Or it'll work but you'll die of old age before it renders.

I would recommend Flash. Flash, unlike SVG, actually works.
posted by jellicle at 12:43 PM on July 13, 2007


Just to follow-up: Adobe is getting rid of the SVG plugin, and there's no other way to see SVG in IE. So nobody using IE will be able to view your presentation, at all.

SVG was supposed to be a non-proprietary Flash killer. Flash was opened enough to eliminate most of the reasons to use SVG, and it had the first-mover advantage, and basically SVG is just a dead-end at this point. Sorry. I wanted SVG to succeed too.
posted by jellicle at 12:56 PM on July 13, 2007


Not entirely, SVG is still being used for it's original purpose. Scalable Vector Graphics.
posted by IronLizard at 2:10 PM on July 13, 2007


Really tempted by Flash now...
posted by dance at 2:54 PM on July 13, 2007


If you go that route (and it'll require learning AS) osflash is a good place to start.
posted by IronLizard at 3:05 PM on July 13, 2007


« Older Fast Flat Feet   |   Should I visit my almost estranged grandmother? Newer »
This thread is closed to new comments.