Converting inkscape svg to raphael problems
I have an svg map that I created in inkscape that I would now like to convert to raphaeljs in order to help make an interactive version for the web as well as make use of the VML fall back for IE. The svg file looks how I want it and I have used Ready Set Raphael to convert it to raphael. But its doesn't show up. I think its probably something I don't understand about how raphael works.
Here is a jsfiddle containing an example extract from the converted file.
Here is js code from jsfiddle:
var rsr = Raphael('map', '706.09003', '658.05029');
var field1 = rsr.path("m 2415.5344,-958.9303 c -19.1444,40.60838 -38.5008,83.5093 -36.2303,129.52066 0.062,13.03202 -0.1751,26.05929 -0.7125,39.08058 30.4076,-0.2234 61.4445,-0.18366 91.4597,-0.57116 -7.7541,-8.69731 -5.9123,-28.03507 7.1245,-30.48066 9.3941,1.85117 13.8856,-10.36777 13.83,-17.76263 -1.3423,-13.91414 9.2674,-27.08769 23.0002,-28.84828 3.9736,-3.61429 18.9733,-6.90909 14.4152,-11.53796 -36.5544,-28.25705 -73.9065,-55.42458 -111.5304,-82.22538 l -0.6785,1.41294 -0.6779,1.41189 z").attr({class: 'field',id: 'field1',fill: '#000000',"fill-opacity": '1',"fill-rule": 'evenodd',stroke: 'none','stroke-width':'1','stroke-opacity':'1',display: 'inline'}).transform("t-885.26624,1081.9108").data('id', 'field1');
The actual map is made of many more elements but I figure if I can get it working for one element I can probably extrapolate!
Any help/pointers greatly appreciated.
链接地址: http://www.djcxy.com/p/56948.html上一篇: 浏览器渲染时,SVG中的箭头不会旋转