Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Raphael JS - Use a SVG file

Tags:

I have seen several threads that adress this question but nothing that really solves my problem. I have a SVG file with a map and differrent regions ( http://www.mediafire.com/?5pmyevdwbyrb51f ). I want do do something like this: http://raphaeljs.com/australia.html.

But the question is how I can convert the file so that is works in the script? How do I get those coordinates? I have tried several converters and such but I must suck at this 'cause I cant get it to work. Maybe someone can help out?

like image 426
larschanders Avatar asked Oct 28 '11 08:10

larschanders


People also ask

Can SVG integrate with JavaScript?

Since SVG images can be inlined in HTML, we can manipulate them with JavaScript. This means that we can animate parts of an image from code, make it interactive, or turn things around and generate graphics from data.


1 Answers

If you mean using Raphael to import an SVG file so you can display it or manipulate it, it's not currently supported. But you might want to check extensions raphael-svg-import or raphael-svg-import-classic.

See also SVG files in Raphael, can they be used?

like image 198
Clafou Avatar answered Oct 06 '22 08:10

Clafou