Jump to content
Software FX Community

Custom SVG Map files


rpiller
 Share

Recommended Posts

 So I'm using Adobe Illustrator 14 in CS4. I open the flights example svg. I then do nothing to it and save it back. Following the instructions posted http://community.softwarefx.com/blogs/powergadgets_team_blog/archive/2007/04/12/Creating-Custom-SVGs-for-PowerGadgets.aspx. Although these are for an older version. The example program then bombs saying things are not grouped. I look at the file and notice a couple Regions are stored funky. The error I get points me to the following in the file:

 

<g>     <g>       <g>         <polygon style="fill:#FFFFFF;stroke:#000000;" points="291.937,219.201 295.246,180.65 298.406,142.55 203.387,130.951           202.025,140.589 195.097,188.32 194.945,188.32 191.937,206.991 220.246,211.36 291.927,219.189         "/>         <text transform="matrix(1 0 0 1 238.917 178.5654)" style="enable-background:new   ;"><tspan x="0" y="0" style="font-family:'ArialMT'; font-size:10;">W</tspan><tspan x="9.438" y="0" style="font-family:'ArialMT'; font-size:10;">Y</tspan></text>       </g>       <g>         <polygon style="fill:#FFFFFF;stroke:#000000;" points="209.866,288.01 220.257,211.36 291.937,219.189 320.846,221.601           319.636,240.871 316.326,299.148 301.416,298.25         "/>         <text transform="matrix(1 0 0 1 262.2852 257.7559)" style="font-family:'ArialMT'; font-size:10;">CO</text>       </g>       <g>         <polygon style="fill:#FFFFFF;stroke:#000000;" points="300.065,123.879 304.887,65.601 330.786,67.4 349.156,68.76           392.376,69.959 392.525,71.471 393.886,75.991 393.438,77.351 392.985,80.51 393.136,85.931 394.346,92.101 395.996,93.911           397.046,99.479 397.346,109.121 397.946,111.081 397.946,114.541 398.096,116.041 400.356,122.82 400.056,125.379           400.206,128.241         "/>         <text transform="matrix(1 0 0 1 341.2974 104.0684)" style="font-family:'ArialMT'; font-size:10;">ND</text>       </g>       <g>         <polygon style="fill:#FFFFFF;stroke:#000000;" points="295.246,180.65 298.406,142.55 300.065,123.879 400.206,128.241           400.356,129.9 399.446,131.86 397.036,134.419 397.188,136.081 402.006,140.75 402.156,175.831 401.256,175.681           400.046,175.831 400.496,177.041 401.096,178.09 400.346,180.05 401.396,181.101 402.006,183.959 400.946,184.86           401.246,186.521 399.736,189.979 401.246,193.601 401.546,195.561 401.546,196.01 398.536,193.9 392.366,189.831           390.855,189.371 388.296,189.371 386.336,190.879 384.226,191.331 382.266,190.879 381.065,188.32 379.556,187.271           377.596,187.721 375.036,187.721 372.926,184.709 295.227,180.65         "/>         <text transform="matrix(1 0 0 1 343.8779 158.2549)" style="font-family:'ArialMT'; font-size:10;">SD</text>       </g>       <g>         <polygon style="fill:#FFFFFF;stroke:#000000;" points="291.937,219.201 295.246,180.65 372.945,184.709 375.056,187.721           377.616,187.721 379.576,187.271 381.086,188.32 382.286,190.879 384.246,191.331 386.355,190.879 388.315,189.371           390.876,189.371 392.386,189.831 398.556,193.9 401.566,196.01 401.566,197.971 403.676,199.169 403.676,200.531           402.776,203.241 404.276,204.59 405.188,207.75 406.846,209.25 406.246,210.76 406.846,212.419 408.806,213.931           409.416,215.431 408.806,217.081 408.356,220.101 410.316,221.15 410.916,222.661 409.856,224.161 410.316,225.669           411.366,227.181 410.916,228.689 411.366,230.8 411.966,231.701 413.016,233.36 414.526,234.871 414.977,237.431           417.086,239.991 417.986,240.589 417.536,242.55 417.836,243.15 319.656,240.891 320.866,221.621 291.956,219.209         "/>         <text transform="matrix(1 0 0 1 349.0146 218.6143)" style="font-family:'ArialMT'; font-size:10;">NE</text>       </g>     </g>     <text transform="matrix(1 0 0 1 307.5591 55.2813)" style="font-family:'ArialMT'; font-size:15;">North </text>     <text transform="matrix(1 0 0 1 348.4063 55.2813)" style="font-family:'ArialMT'; font-size:15;">W</text>     <text transform="matrix(1 0 0 1 362.293 55.2813)" style="font-family:'ArialMT'; font-size:15;">est Central</text>     <text transform="matrix(1 0 0 1 434.8252 55.2813)" style="font-family:'ArialMT'; font-size:15;"> </text>   </g>Any idea what's going on?
Link to comment
Share on other sites

 Here is the original line in the file that comes with the sample:

<text transform="matrix(1 0 0 1 307.5591 55.2813)" enable-background="new   "><tspan x="0" y="0" font-family="'ArialMT'" font-size="15">North </tspan><tspan x="40.847" y="0" font-family="'ArialMT'" font-size="15">W</tspan><tspan x="54.734" y="0" font-family="'ArialMT'" font-size="15">est Central</tspan><tspan x="127.266" y="0" font-family="'ArialMT'" font-size="15"> </tspan></text>

 

So there is only 1 <text> tag and it's all on 1 line, but Illustrator splits it into 3 <text> tags which seems to be causing the issue. Any ideas on how to fix this?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...