我开发了一个程序,它采用大象路径的坐标并在谷歌地图中渲染它,并动画沿着路径移动的大象图标。由于Google采用SVG路径渲染图像,因此我使用inkscape创建了一个大象并导出了数据。但是图片没有在谷歌地图中显示。请帮忙。
大象的路径
M 91.63,351.00 C 99.03,321.37 111.74,278.89 132.17,256.00 138.87,248.50 146.48,241.68 156.00,238.06 163.31,235.29 169.33,235.89 172.83,233.41 175.17,231.74 180.79,223.91 191.00,216.77 208.78,204.32 227.74,200.76 249.00,201.00 269.61,201.24 295.02,210.56 313.00,220.31 313.00,220.31 336.00,234.07 336.00,234.07 339.31,235.10 347.18,233.37 351.00,233.09 351.00,233.09 382.00,232.00 382.00,232.00 382.00,232.00 392.00,232.92 392.00,232.92 433.79, 236.26 469.46,254.65 495.34,288.00 523.36,324.11 536.80,375.21 542.15,420.00 542.15,420.00 545.09,454.00 545.09,454.00 545.09,454.00 546.00,466.00 546.00,466.00 546.00,466.00 546.00,526.00 546.00,526.00 546.00,526.00 545.00,544.00 545.00 ,544.00 545.00,544.00 542.42,578.00 542.42,578.00 542.09,580.56 542.21,586.67 540.83,588.43 539.26,590.41 535.30,590.00 533.00,590.00 533.00,590.00 474.00,590.00 474.00,590.00 474.00,590.00 477.00,548.00 477.00,548.00 477.00,548.00 477.00,524.00 477.00,524.00 476.98,511.41 474.37,488.59 465.79,479.04 461.09,473.81 4 55.55,472.31 449.00,470.63 439.73,468.25 424.49,465.62 415.00,464.98 415.00,464.98 388.00,463.00 388.00,463.00 360.17,462.96 334.67,462.34 307.00,466.92 290.81,469.60 273.07,473.32 262.53,487.00 256.12,495.31 253.02,506.81 251.25, 517.00 248.99,530.04 248.98,539.95 249.00,553.00 249.00,553.00 252.00,590.04 252.00,590.04 252.00,590.04 240.00,590.04 240.00,590.04 240.00,590.04 228.00,591.00 228.00,591.00 228.00,591.00 200.00,591.00 200.00,591.00 184.49,591.00 182.07 ,592.46 182.00,582.00 182.00,582.00 182.00,570.00 182.00,570.00 182.00,570.00 181.00,557.00 181.00,557.00 181.00,557.00 181.00,533.00 181.00,533.00 181.00,533.00 180.00,516.00 180.00,516.00 180.00,516.00 181.00,496.00 181.00,496.00 181.00,496.00 182.17,463.00 182.17,463.00 182.17,463.00 185.00,440.00 185.00,440.00 185.00,440.00 136.00,430.09 136.00,430.09 117.26,429.01 112.23,450.40 110.13,465.00 106.84,487.94 106.04,510.85 106.00,534.00 106.00,534.00 105.00, 551.00 105.00,551.00 105.00,551.00 105.00,586.00 105.00,586.00 105.00, 586.00 66.00,581.00 66.00,581.00 66.00,512.62 75.07,417.21 91.63,351.00 Z
答案 0 :(得分:0)
这对我有用:
var elephantSymbol = {
path: 'm91.63,351c7.4,-29.63 20.11,-72.10999 40.54,-95c6.7,-7.5 14.31,-14.32001 23.83,-17.94c7.31,-2.77 13.33,-2.17 16.83,-4.64999c2.34,-1.67 7.95999,-9.5 18.17,-16.64c17.78,-12.45 36.74001,-16.01001 58,-15.76999c20.60999,0.24002 46.01999,9.56 64,19.31c0,0 23,13.76001 23,13.76001c3.31,1.03001 11.17999,-0.7 15,-0.98c0,0 31,-1.09001 31,-1.09001c0,0 10,0.92 10,0.92c41.79001,3.34001 77.45999,21.73001 103.34,55.07999c28.01999,36.10999 41.45999,87.20999 46.81003,132c0,0 2.94,34 2.94,34c0,0 0.90997,12 0.90997,12c0,0 0,60 0,60c0,0 -1,18 -1,18c0,0 -2.58002,34 -2.58002,34c-0.32996,2.56 -0.20996,8.66998 -1.58997,10.42999c-1.57001,1.97998 -5.53003,1.57001 -7.83002,1.57001c0,0 -59.00015,0 -59.00015,0c0,0 3,-42 3,-42c0,0 0,-24 0,-24c-0.01999,-12.59 -2.62985,-35.41 -11.20999,-44.95999c-4.69995,-5.23001 -10.23999,-6.73001 -16.79001,-8.41c-9.26999,-2.37985 -24.51001,-5.01001 -34,-5.64984c0,0 -27,-1.98001 -27,-1.98001c-27.82999,-0.04001 -53.32999,-0.66 -81,3.91995c-16.19,2.6799 -33.92996,6.3999 -44.47,20.08005c-6.40985,8.31 -9.50992,19.81 -11.27992,29.99985c-2.25999,13.03998 -2.27,22.95001 -2.25,36c0,0 3,37.03998 3,37.03998c0,0 -12,0 -12,0c0,0 -12,0.96002 -12,0.96002c0,0 -28,0 -28,0c-15.50999,0 -17.92999,1.46002 -18,-9c0,0 0,-12 0,-12c0,0 -1,-13 -1,-13c0,0 0,-24 0,-24c0,0 -1,-17 -1,-17c0,0 1,-19.99985 1,-19.99985c0,0 1.17,-33 1.17,-33c0,0 2.83,-23 2.83,-23c0,0 -49,-9.91 -49,-9.91c-18.74001,-1.07999 -23.77,20.31 -25.87,34.91c-3.28999,22.94 -4.09,45.85001 -4.13,68.99985c0,0 -1,17 -1,17c0,0 0,35 0,35c0,0 -39,-5 -39,-5c0,-68.38 9.07,-163.78986 25.63,-229.99985l0.00002,-0.00003l0.00002,-0.00003l0.00002,-0.00003l0,-0.00003l0.00002,-0.00003z',
rotation: 90,
scale: 0.1,
strokeOpacity: 1,
color: 'black',
fillColor: 'black',
fillOpacity: 1,
strokeWeight: 1
};