SVG Strip Map Generator - Documentation

This page serves to document all of the customization options available.

Lines and Stations

The primary component of a strip map is the line, including stations and text. The SVG Strip Map Generator provides the following features.

Each line object has the following fields. Required fields are in red, Optional fields are in blue.

X and Y transforms require special note, as while Y transforms are all in pixels, most X transforms are in terms of stations and the distance between stations (which is calculated automatically based on the number of stations).

All fields that take pixel values must be numbers and NOT Strings. While "16px" may be fine in some cases, the values are often used as numbers in calculations.

The required strokes field of the line object is an array of objects that has the following options.

The required stationtypes field of the line object is an array of objects that has the following options.

Each object in stnnodes contains the following options.

The required stations field of the line object is an array of objects that has the following options. Note that stations go from left to right on the strip map.

The optional customsvg field of the station object is an array of objects that has the following options. This is optional and is primarily utilized for station numbers/elements that are different between stations. If used, width, height, and svg must all be provided. For a working example, refer to Test 3 in the Internal Test Suite.

The optional key field of the line object is an object with two fields:

Each object in the stationtypes array for the map key contains the following options.

Each object in the lines array for the map key contains the following options.

Icons

The SVG Strip Map Generator also uses reusable icon definitions.

Each icon object has a single icons field which is an array of objects with the following specification:

The optional extraicons field of the line object object is an array of objects that has the following options. This is optional and is primarily utilized for through-running connections or where multiple lines share track. For a working example, refer to Test 3 in the Internal Test Suite.

As a convenience, text icons are supported by this method for the placement of arbitrary text on the map.