Instructions assume you are using Adobe Illustrator CS3 to make the SVG, and that you can run PHP code on your system. My tutorial does not cover how to install PHP nor how to use Illustrator.
Download: Code & Tutorial
1. Download the zip file from http://sillysoft.net/lux/svg-to-luxb.zip
2. Unzip the contents:
- a. This tutorial named "tutorial.rtf"
b. The code named "svg_to_luxb.php"
c. A test SVG named "map.xml"
Adobe Illustrator CS3: Create an SVG
1. Draw the country shape vectors
- a. Make sure the vectors have no curved lines.
b. Make sure your points snap to a grid.
c. Rectangles should be given an extra point to transform them into polygons.
3. Select the country shapes and map-size rectangle, then flip them upside down together.
4. Export the file as an SVG (default settings).
Text Editing & PHP: Save as Luxb
1. Save a copy of the SVG as "map.xml".
2. Place the "map.xml" in the same folder as the "svg_to_luxb.php" file.
3. Edit the "map.xml" file:
- a. Make sure the "map.xml" file uses Unix-style newlines (LF).
b. Polygons should not have coordinates with decimals.
- a. If the page gives an error, follow the instructions on the page.
- a. Delete the rect fill="#______" width="___" height="___" line (the map-size rectangle vector).