When you create a new map from a SVG file, MapSVG parses the file and tries to find SVG shapes that could be interactive. Those objects get into the Regions table in MapSVG. Then you can add custom fields to your Regions in MapSVG, which will be shown in the next articles.
SVG objects that match ALL of the following rules get into the list of Regions:
Object has an ID. Example, SVG object without ID:
<path d="..." />
SVG object with ID:
<path id="area-51" d="..." />
If you're creating a custom SVG file in Adobe Illustrator: you can't set IDs for individual SVG objects there. AI converts layer names to IDs but layer may contain multiple SVG object. ID will be given to a
<g id="layer-name">...</g>SVG tag and individual SVG objects inside of it will be left without IDs. So it is recommended to use Inkscape (free SVG editing software) for SVG editing (at least for final SVG editing after AI). How to set an Object ID in Inkscape: open your SVG file, right-click on a vector shape, choose "Object properties", enter ID, click "Set". Also you can set IDs right in MapSVG by clicking on "Edit SVG file" button in the top toolbar.
nonecolor fill values, use
rgba(0,0,0,0)as a trasparent color.
<path id="lot_number_12" d="..." /> <rect id="lot_number_3" x="..." y="..." />
These objects will be skipped:
<path id="path_231" d="..." /> <circle id="circle_89" x="..." y="..." />
Regions have 2 default fields, that are taken from SVG object attributes:
Example: USA in the world.svg file has ID "US" and the title "United States".
All geo-calibraed maps included in MapSVG have both "id" and "title" attributes. Older uncalibrated maps have only "id". You can add titles in SVG file by using Inkscape editor or in MapSVG, by clicking on "Edit SVG file" button.
Regions can have the following custom fields: