Skip to main content

What is Regions in MapSVG

When you create a map from an SVG file, MapSVG finds interactive shapes and lists them as Regions. You can add custom fields to Regions and show that data in templates, the Directory, popovers, and details views.

SVG objects → Regions

Only shapes that meet MapSVG’s SVG rules become Regions (ID, fill, optional ID prefix, supported element types).

Canonical checklist: Using a custom SVG file › SVG file requirements

Set Region ID prefix under Regions › Settings when the SVG has many decorative IDs and you only want some shapes to be Regions.

Default fields

Regions have 2 default fields, that are taken from SVG object attributes:

  • id: short text without spaces
  • title: longer text, can contain spaces

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.

Custom fields

Regions can have the following custom fields:

  • Text: short text, 255 characters max.
  • Textarea: long text, with optional HTML support
  • Status: custom statuses. Example: "Available / Sold". Each status has a user-defined color and enabled/disabled option, which control if Region must be disabled.
  • Select / Multiselect: drop-down list of values
  • Checkbox: any value that can be on/off
  • Radio: list of values
  • Images: set of images. Each image comes in 3 different sizes: thumbnail, medium, full
  • WP Post: WordPress post
  • Date: datepicker field, supports many international formats