我正在svg中开发一个交互式地图,它必须在Ie8上正常工作。
我是否必须向raphael添加内容,将svg转换为vml?
我的代码在这里:http://jsfiddle.net/Wd3sh/2/
var R = Raphael('map', 500, 500);
R.setViewBox(0, 0, 185376.58, 190124.91);
var attr = {
fill: '#6689AC',
stroke: '#fff',
'stroke-width': 1,
'stroke-linejoin': 'round'
};
var br = {};
br.ac = R.path('m 6610,62120 c 6786.854,4221.189 15427.704,3211.721 21897.513,8102.257 3711.038,2219.267 8970.884,3627.278 12056.487,5690.743 -1166.064,433.976 -1305.798,1388.22 -2347,1737 -302.351,372.597 -995.051,-33.245 -1061,482 -520.432,14.035 -1605.419,1235.177 -1833,1543 -1130.336,-897.569 -1848.663,202.866 -2540,1383 -662.084,192.914 -2324.89,1203.015 -2315,96 -428.874,63.787 -1483.514,-159.378 -2379,-289 -840.438,-140.907 -1851.114,142 -3087,-96 -706.209,104.999 -1551.547,1098.045 -2508,353 -1554.89,-2304.193 -876.075,-5832.349 -804,-5787 916.297,-289.291 -228.353,-1365.906 257,-1351 654.343,-399.256 1.419,-855.901 -450,-128 -660.683,491.278 -1432.163,1167.762 -2604,2122 -914.089,395.65 -3810.94,393.804 -4566,96 216.794,-906.281 -611.123,-1021.709 -514.001,-2090 -1585.828,-459.105 -2123.119,-594.79 -4341,-707 569.129,-754.866 1766.782,-1421.247 836,-2476 -182.296,-265.422 -892.5102,-1170.871 -1286,-1447 -209.6372,-941.002 -1557.154,-1133.61 -1479.1612,-2476.238 -679.1104,-726.434 -842.2323,-836.729 -451.3297,-1575.059 C 6112.2181,64949.049 5669.1219,64327.561 5934.9987,63567 5358.9518,62778.977 8139.4796,64093.796 6610,62120 z').attr(attr);
答案 0 :(得分:1)
<强> [编辑] 强>
问题在于:
br.pa = R.path('m 77219,21381 c 623.873,744.431 1084.656,-798.441 1704,-160 632.67,-201.695 -272.872,-1223.155 707,-1094 238.706,-1133.17 2195.72,693.361 1962,-803 896.729,-382.282 1226.127,-237.595 2057,-290 435.677,-589.092 826.039,-1637.969 1544,-1222 650.767,-707.578 1004.328,536.566 1800,386 519.91,-36.724 1447.579,-394.842 2187,-257 715.309,57.866 1992.196,1028.17 2122,-64 309.274,-827.368 -998.191,-1172.588 -867.453,-1801.273 269.067,-262.897 503.631,-257.706 610.453,-867.727 516.5,-211.886 1457.388,730.485 2347,289 959.864,-22.981 2409.297,-1566.311 2928.438,163.742 718.032,873.18 62.862,1630.214 479.562,2441.258 -55.331,1266.486 2306.647,319.946 2412,1061 703.782,-33.813 546.359,1055.562 1061,836 599.72,394.396 916.65,714.945 1575,482 -89.9,320.092 640.81,183.033 643,515 -182.45,650.251 1289.93,241.646 483,836 -109.75,1405.802 2316.25,1857.702 1414.44,3183.426 207.49,1504.106 930.84,2974.26 2250.56,3921.574 -576.23,1406.384 1272.4,1077.807 836,2412 157.99,120.27 635.73,454.652 418,1190 611.07,97.587 1422.73,748.748 1768,771 53.16,-826.074 1358.99,398.181 1671.94,-1061.609 -38.11,-1693.104 1583.57,-3018.91 2444.67,-4339.46 1311.38,-881.041 3239.13,-1499.795 3504.82,-3441.365 2265.34,-1422.29 1947.89,1812.013 2153.57,1351.434 1294.61,-222.099 1714.77,-376.196 2572.44,1254.426 1172.18,1275.935 3211.74,1575.188 4855.56,1574.574 -828.44,1175.259 2659.43,744.23 2186,1801 488.5,-654.528 340.4,137.146 611,193 104.86,-1059.648 193.82,235.402 546,-643 287.59,501.04 435.58,933.862 708,321 457.15,937.154 233.58,655.235 545.99,-64 95.2,696.94 682.56,-253.467 901,289 198.97,28.893 48.2,408.634 450,129 -309.79,1156.708 411.72,-648.998 418,386 277.45,131.695 -629.74,-394.221 193,257 77.6,-901.462 436.59,-63.61 450,353 392.68,-883.005 471.1,-465.464 450,-160 226.2,312.96 122.63,187.102 418,-65 -103.38,842.009 441.05,-182.942 322,65 357.92,-581.954 308.36,347.389 64,643 344.39,-119.134 649.02,-235.314 675,-97 113.78,-671.015 661.18,-341.967 225,-64 -100.22,334.401 130.33,568.555 354,482 -165.41,-214.052 431.37,-223.511 257,161 371.17,0.98 206.83,-590.346 579,-804 245.53,213.001 -79.69,264.889 -1.58,806.619 -600.03,1191.313 804.65,-1357.681 194.58,254.381 228.31,19.32 19.48,-108.835 546,-514 -377.99,1278.777 -272.68,1847.854 -418.43,3247.436 -599.41,255.435 -1057.36,459.072 -224.57,707.564 -58.13,963.616 -608.36,1902.808 -1061,2283 -204.68,327.74 349.94,1024.706 -321,1254 -490.53,445.858 -1096.44,929.365 -386,1350 -600.3,-16.549 -280.15,1313.02 -707,1511 -216.81,662.445 -1111.69,1131.093 -1190,1833 -439.44,740.887 -545.26,2300.077 -1672,2701 -152.06,960.117 -840.46,1711.907 -1736,2604 -1716.87,464.577 -3663.3,2626.578 -4888,3762 897.58,375.909 1808.39,-171.283 2219,836.004 1512.84,512.599 -954.7,1040.207 161.01,1962 -800.69,336.473 -1836.4,1714.473 -965,1318 795,1158.353 -896.28,366.397 -1093,1672 -115.02,1498.736 -3734.05,875.329 -2476.28,3312.524 -971.69,912.324 -1224.16,2220.885 161.04,2797.023 -80.17,2367.379 -1475.06,4476.135 -3279.72,5947.453 -1010.98,1244.272 -1146.27,2514.308 -1800,3955 -10272.37,-591.239 -21017.581,-1551.193 -30996,-2250.999 -192.146,-1069.933 -1644.472,-531.068 -1544,-1768 -871.631,-681.277 -1807.295,-873.912 -2347,-1511 -660.863,-1203.049 65.285,-2555.665 -1125.166,-3667.827 -319.724,-1886.425 -1541.334,-3116.818 -2346.834,-4660.173 -2089.134,-1502.672 1389.756,-2916.756 1243.781,-4723.938 2430.959,-5798.253 5662.541,-11902.305 7693.059,-17526.449 -506.902,-753.174 2742.652,-2070.839 998.16,-1896.613 -718.41,707.193 -1540.568,575.248 -2283,643 -190.002,-1120.53 -1493.055,-1302.029 -1157,-1093 -658.69,-1076.972 -1353.976,-1317.012 -2058,-1254 -706.535,-417.995 -1427.924,-663.21 -2315,-1383 -913.178,296.092 -92.31,-2437.309 -1191.903,-1122.607 -887.742,179.04 -1444.26,-1032.383 -1638.097,-1578.393 -695.795,-498.008 -1409.376,-1190.489 -1286,-2218 -1348.76,-989.409 -315.791,-3815.733 -707,-5653.444 -0.03,-795.171 0.06,-1590.45 -0.04,-2385.561 z m 60641,11254 c 68.14,-322.839 243.3,458.874 0,0 z m -4373,-1768 -32,32 32,-32 z m 3858,1093 c 16.52,98.278 -98.28,-16.52 0,0 z m -3986,-1061 c 71.95,-41.83 -41.83,71.948 0,0 z m 2057,514 c 98.28,-16.52 -16.52,98.278 0,0 z m 1351,643 c -109.02,-134.322 92.02,-21.998 0,0 z m -579,258 c -90.02,5.013 114.23,-55.211 0,0 z m -6624,-1705 c 160.38,-160.966 -50.44,208.269 0,0 z m 6913,1705 c 41.37,-298.605 70.62,110.085 0,0 z m -3086,-1544 c 220.59,-36.506 35.01,204.607 0,0 z m 3022,1254 c -392.41,610.452 -80.39,-345.173 0,0 z').attr(attr);
br.ap = R.path('m 96286,15497 c 871.176,14.29 3645.98,2177.887 4437,708 327.85,39.392 1030.12,-718.359 965,-128.997 690.3,516.84 1515.45,13.517 1961,-32 701.35,339.562 -336.43,882.333 836,547 1168.95,550.471 1652.57,-544.171 2476,-1222 461.06,-630.24 627.56,-1740.141 1157,-2540 -15.6,-1220.541 1110.64,-1618.963 1736,-3087 508.55,-1357.4207 2195.51,-2098.9354 2187,-3987 1260.95,662.6901 2192.09,2260.9854 2154,3472 -324.23,2244.754 1011.79,4270.158 1124.96,5981 924.53,-16.372 176.65,2627.853 1544,1415 1272.16,257.952 842.92,2290.247 2480.06,2220.371 1236.11,1150.378 274.87,3890.354 -422.02,4724.629 -865.97,379.534 -2507.45,3959.428 -2315,2508 -1757.28,1181.718 -3547.22,2076.253 -4438.18,4083.186 -1296.64,852.689 -326.31,3219.423 -2088.79,2925.814 -238.55,-444.103 -622.09,896.098 -965,-160 -1505.92,206.894 -1003.35,-1090.186 -1479.25,-1414.92 571.44,-30.064 -5831.51,-4255.093 -932.75,-1447.082 245.81,-1143.389 -832.64,-1680.319 -1414.15,-2476.768 -593.79,-1152.411 -1142.16,-2531.602 -803.85,-3568.232 -793.67,-796.885 -1845.08,-1659.4 -1317.98,-2508 -436.2,-156.582 -671.5,-169.83 -708,-707 -683.85,49.75 -394.65,-460.158 -1029,-258 -456.29,121.344 -933.99,-586.491 -1446.96,-546 -239.891,-767.73 -807.971,-946.628 -1575,-1190 -936.896,33.118 -1864.157,-14.026 -1672,-1093.002 -395.942,-790.944 353.367,-1302.178 -450.09,-2218.999 z').attr(attr);
br.mt = R.path('m 64261,72698 c 861.078,-65.671 188.351,-1279.02 675,-1929 4069.794,-871.527 17074.285,-247.02 14437,-418 256.614,-853.926 112.975,-418.345 192.622,-1061.378 162.111,-1221.062 876.891,-2372.966 98.378,-3634.653 1065.016,-425.387 710.063,-3704.855 1928.198,-1477.472 264.63,1597.144 1731.627,2882.455 1381.802,4404.503 272.667,811.776 298.22,1673.813 1253.871,1897.519 541.271,462.718 1964.709,788.77 1801.129,1897.481 1150.529,-413.673 962.288,1209.624 1736,771 10015.879,986.398 20878.42,1456.368 30417,2444.002 -638.1,1415.052 -1117.56,2923.757 -1608,4083 39.04,1331.677 -714.34,2803.829 -597.01,4248.232 436.17,357.105 -140.16,1369.698 276.01,1796.768 -329.01,1248.441 447.54,2482.339 -225,3441 549.76,442.843 265.16,871.082 932,1157 -775.43,839.937 -50.35,2186.811 -1221,3151 -729.2,887.064 -144.1,2072.601 -611,2894 -867.2,1158.304 -14.24,3701.168 -1801,4468.998 -1044.06,-692.88 -2175.06,1076.26 -2058,2219 -395.52,172.04 -376.18,1769.92 -1318,1704 -861.47,221.7 -1442.21,373.83 -1865,1254 -1036.11,162.98 -723.26,867.85 -1447,1093 425.4,704.44 304.15,1227 -225,1351 -81.36,706.65 -1080.27,1084.85 -1447,1512.26 14.35,912.93 -595.46,1093.38 -838,2023.74 94.7,518.3 -571.67,1755.14 356.02,2508 891.48,1250.62 -829.43,877.41 -1416,709 -423.49,372.24 -1268.81,-26.73 -1767,-68 -578.99,-162.17 -990.46,-639.66 32,-1444 1552.94,132.24 424.11,-3459.38 -129,-1544 -1175.42,470.88 -867.88,1440.97 -1961,1318 -891.65,480.96 -883.54,-1360.58 -2059.004,-578.51 -1088.493,761.68 -2521.687,858.33 -2929.978,162.22 -743.252,42.51 -1456.038,-727.69 -1699.018,-997.71 -1059.66,-49.23 -1291.114,-534.48 -2222,-801 -672.807,329.72 -1221.63,727.4 -1926,672 -820.908,-5.77 -1364.248,176.89 -1607.516,998.5 -573.448,488.46 -1077.01,1417.75 -1705.984,1445.5 -777.102,111.25 -1483.776,658.16 -1927.5,-450 -312.055,-224.17 -542.926,-1965.93 -1736,-1029 -1129.806,-571.83 -2013.944,-1657.47 -2154,-2798 -3848.731,-1327.93 -11045.891,-11665.102 -9196.5,-8038 -870.009,-721.35 -1171.142,-5638.482 257.5,-3825.998 -292.087,-615.726 -1028.085,-1656.644 -193,-2572 -548.549,-500.602 -251.844,-964.297 -1061,-1222 -1505.225,-436.844 1625.524,-1058.31 1222,-2219 220.223,-896.006 910.609,-1318.362 1286,-2154 -571.374,-1761.017 2409.306,-1713.349 866.339,-3027.984 -110.799,-1032.036 -648.613,-1502.919 -931.339,-1925.016 -472.206,-920.246 333.477,-1422.148 837,-2314 -317.259,-1280.049 -378.916,-1131.782 -1704,-1254 -222.467,-125.524 -734.384,187.377 -804,-482 -1411.818,-362.545 -6180.055,974.859 -4920,-965 84.162,-801.575 185.74,-2010.281 -418,-2861 -143.355,-512.332 579.675,-1975.276 129,-2444 645.637,-463.402 -99.558,-1223.507 -291,-1703.5 -230.106,103.893 192.02,-485.006 -95.02,-386.502 z').attr(attr);
br.ma = R.path('m 125256,53503 c 1785.54,-1426.612 3691.19,-3253.624 5562,-4052 677.64,-1040.023 1009.38,-1690.033 1415,-2379 1284.4,-668.202 960.32,-2419.692 1608,-2830 -2.66,-646.734 931.34,-855.425 900,-1414 413.78,-204.075 343.77,-1130.984 547,-1511 540.69,-53.217 -709.98,-1007.505 643,-1319 208.37,-136.403 638.79,-1031.924 161,-1093 304.73,-739.851 1285.03,-1131.482 1061,-2347 204.36,-483.584 -902.31,-595.628 192,-836 376.9,-562.229 382.88,-1607.488 226,-1929 305.72,-841.536 511.85,-872.351 900,-1287 -84.25,520.585 -79.85,217.058 96,901 471,-1368.919 493.4,-505.258 193,-290 436.35,-186.904 -270.31,538.25 193.22,321.668 -134.66,297.739 255.14,-68.161 289.78,-385.668 -77.88,784.564 69.44,635.644 289,-128 490.99,6.716 -141.88,644.41 63.75,932.755 307.35,-85.498 -345.05,653.543 257.25,-64.755 -123.43,199.996 486.61,-1709.773 226,-386 256.84,691.475 -980.92,1040.769 32,546 244.98,-957.082 -39.84,586.768 257,-289 175.76,5.863 -80.72,430.53 96,257 297.77,-402.121 -87.22,727 321.64,65.178 595.22,-595.477 -239.88,362.397 64.36,867.822 -175.67,100.108 336.12,-638.015 225,-418 231.77,16.718 245.02,-410.044 354,-515 308.17,-207.395 141.98,560.441 -193,868 297.72,-506.522 -345.92,855.477 193,-193 400.78,33.941 -332.46,1154.793 -193,1029 58.67,351.969 134.01,-160.034 515,-353 360.27,-659.83 830.26,-849.79 675,-354 93.55,-1238.882 136.27,-571.076 160,-193 92.18,-132.856 91.27,-640.273 129,32 599.05,-174.571 636.98,132.313 965,-386 534.86,4.457 -383.49,300.276 -97,868 638.64,1.35 350.72,135.945 579,-96 87.39,108.033 241.04,-74.213 322,32 600.2,42.677 -463.35,432.408 -386,450 -403.64,562.656 826.87,-156.721 -97,579 -290.9,70.338 418.92,120.904 675,-257 -408.06,860.487 425.49,-893.352 97,386 164.42,-486.955 281.91,170.292 385.67,193.219 -408.07,281.518 395.11,95.419 289.33,513.781 -66.69,688.889 422.76,1163.632 643,1769 -779.29,592.062 806.41,902.108 1254,385 433.22,-154.781 185.74,247.059 -32,193.005 694.98,187.73 2119.92,-1803.671 1286.34,-450.204 537.96,32.739 2097.89,1508.723 1575.66,32.204 1240.34,-556.82 3436.58,863.286 3762,1222.001 -9.62,-142.235 -496.69,-746.659 611,290 818.13,172.928 2270.81,-63.21 2668,160 1393.44,-344.514 508.37,834.798 868,1512 -432.12,757.512 -1269.16,1138.54 -1447,1511.002 -691.44,1127.799 -1883.09,26.461 -2411,1447 -210.42,1358.432 -1317.45,2182.815 -1639.98,3279 541.7,540.868 745.28,1272.655 193.33,1994.219 307.52,1135.673 1256.39,3012.465 -257.35,3889.781 -916.49,1091.966 -548.06,2963.727 675,3730.002 87.74,967.858 -329.08,2884.364 -1929,2508.004 -1083.87,907.98 -1978.52,-1184.008 -3183,-64 -1003.45,-77.179 -1085.91,714.169 -1801,1704 -1194.16,108.207 -1606.09,1526.195 -2604.18,1415.356 -1146.47,770.899 -3127.01,753.977 -3086.82,2089.644 -122.08,1026.076 -1034.03,3007.553 -1447,4051 -1262.65,695.253 -348.17,2019.445 -418,3087 861.11,614.889 309.8,1542.414 288.9,2508.386 65.13,781.639 -371.03,2774.576 -964.22,1799.846 -1226.95,508.734 -2249.51,-760.231 -2089.68,-1736.232 -835.51,-87.952 -704.71,-907.655 -322,-1415 -185.27,-819.03 -1584.63,-539.869 -1254,-1672 -358.88,-542.986 -837.37,-465.556 -1093,-772 214.02,-433.355 965.95,-1328.591 708,-2025 211.21,-246.069 282.07,-1462.069 1704,-1479 918.81,-923.406 -156.05,-2702.607 -1126,-1769 -665.82,-69.303 -1219.76,1026.671 -1575,0 -454.32,-633.334 -1011.06,-1346.542 -1126,-1543 -210.19,-266.561 -828.47,-910.624 -994.88,-1125.422 1372.49,-666.979 -1872.91,-782.637 -451.12,-1253.578 988.81,-1315.464 940.9,-3062.291 1220.85,-4598.37 -397.4,-1573.433 157.9,-4033.938 -2090.35,-4084.253 -237.66,-1244.707 -1728.37,-82.067 -2474.5,-996.379 -1172.31,-35.053 -861.51,929.449 -1833,868.988 z m 13890,-20450 0,-32 0,32 z m 2476,1286 c -77.54,-133.101 -114.65,-54.378 0,0 z m 1157,-353 c -8.65,-383.79 166.64,594.661 0,0 z m 33,-33 c -60.89,-45.335 -34.33,109.447 0,0 z m -2862,-353 c 88.16,36.649 -37.32,-90.439 0,0 z m 32,0 c -113.77,388.547 -26.22,87.685 0,0 z m 4244,1993 c 279.55,21.801 -118.83,213.46 0,0 z m -32,-418 c -87.92,36.418 36.42,-87.922 0,0 z m -5048,-1608 c 44.74,402.675 94.97,431.691 0,0 z m 6463,4245 c -72.78,-34.977 114.47,-8.072 0,0 z m -2026,-3859 c 16.3,-223.984 -651.61,717.56 -579,-128 375.94,283.576 92.64,-585.213 772,96 -300.71,248.689 -15.15,-249.773 -193,32 z m 482,1094 c 34.33,-109.447 60.89,45.335 0,0 z m -5112,-1512 c -16.52,-98.278 98.28,16.52 0,0 z m 5884,2573 c 36.58,-102.478 112.12,-42.896 0,0 z m -4823,-2380 c -142.25,81.487 88.52,97.947 0,0 z m 322,-128 c 77.66,-121.946 100.66,-35.427 0,0 z m 3504,1414 c 464.22,-1120.821 443.18,36.722 0,0 z m 3859,4148 c 28.93,-166.197 132.63,-93.963 0,0 z m -4759,-4951 c 145.49,-28.344 122.15,174.453 0,0 z m -2251,-33 c 180.99,-125.917 -36.36,-144.989 0,0 z m 4084,1994 c 31.46,-149.489 59.12,311.567 0,0 z m 836,1125 c -24.52,-241.892 152.01,32.682 0,0 z m -1351,-1736 c 97.58,-187.434 179.17,142.563 0,0 z m -3183,-1286 c 59.3,-211.097 102.97,119.297 0,0 z m 4405,3247 c 347.23,-287.643 161.99,68.808 0,0 z m -32,193 c 107.86,-217.356 178.41,148.306 0,0 z m -2894,-3408 c 271.5,-593.961 82.02,117.455 0,0 z m -3311,-1061 c 169.63,-248.278 52.82,368.621 0,0 z m -97,-354 c 264.11,-254.71 28.34,390.586 0,0 z m 5723,3441 c 86.34,103.725 88.72,-18.662 0,0 z m -96,109 c 27.07,190.784 325.7,-44.238 0,0 z m -579,-1363 c 22.88,-459.103 324.48,32.47 0,0 z m -1029,-1158 c -102.83,196.829 18.85,60.345 0,0 z m -32,97 c -311.83,-298.667 231.53,461.959 0,0 z m 1833,2411 c 2.47,-606.538 310.04,42.545 0,0 z m -4437,-3022 c -675.57,222.917 109.65,-494.607 0,0 z m -643,96 c -427.98,107.884 117.5,-578.054 0,0 z m 4147,1351 c 444.46,-573.274 -269.47,171.337 0,0 z m -578,-997 c 146.1,-10.537 10.54,-146.098 0,0 z m 32,-64 c -59.05,-43.961 -33.29,106.131 0,0 z m -32,0 c 107.11,-34.831 -45.33,-60.185 0,0 z').attr(attr);
必须是错误的逗号。
答案 1 :(得分:0)
没有。 Raphael自动检测IE并使用VML而不是SVG。你无需做任何事情。