Theme Editor (mapprstyle.html)
The Theme Editor is a standalone page (separate from the main pitchmappr application) that provides a comprehensive visual interface for creating custom themes. It includes a live MapLibre map preview, all 87 flavor color properties as color pickers, layer visibility toggles, line width controls, label styling, and advanced settings. Themes created here are exported as .js files that pitchmappr loads via <script> tags.
The editor supports both Regular and Focus theme modes via a toggle at the top of the page. Focus themes include additional sections for mask/border colors and city marker defaults.
FLAVOR_SCHEMA Sections (22 sections)
| # | Section | Type | Focus Only | Description |
|---|---|---|---|---|
| 1 | Base Style | Radio buttons | No | Selects the base flavor (light/white/grayscale/dark/black) that provides the starting color palette. All 87 color properties are initialized from this flavor's defaults. |
| 2 | Background & Earth | Color pickers (2) | No | Sets the fundamental background and land fill colors. These are the most visually impactful colors on the map. |
| 3 | Landcover | Nested color pickers (7) | No | Sets terrain type colors: barren, farmland, forest, glacier, grassland, scrub, urban area. Stored as a nested landcover object in the theme's overrides. |
| 4 | Landuse | Color pickers (17) + toggles | No | Sets colors for land use areas: parks (2), hospital, industrial, school, woods (2), pedestrian, scrub (2), glacier, sand, beach, aerodrome, runway, zoo, military. Each feature has a per-layer visibility toggle. |
| 5 | Water | Color pickers (1) + 2 toggles | No | Sets water body color. Extra toggles for rivers and streams visibility. |
| 6 | Structures | Color pickers (2) + slider | No | Sets building and pier colors. Includes building opacity slider (0–1). Per-layer visibility toggles for buildings and piers. |
| 7 | Road Fills | Color pickers (7) + 1 toggle | No | Sets fill colors for 7 road types: other, minor service, minor A/B, link, major, highway. Extra toggle for railways. |
| 8 | Road Casings | Color pickers (7) | No | Sets casing (outline) colors for road types: minor service, minor, link, major early/late, highway early/late. |
| 9 | Tunnels | Color pickers (10) | No | Sets colors for 5 tunnel casing types and 5 tunnel fill types. Master toggle hides all tunnel layers. |
| 10 | Bridges | Color pickers (10) | No | Sets colors for 5 bridge casing types and 5 bridge fill types. Master toggle hides all bridge layers. |
| 11 | Infrastructure | Color pickers (2) + 1 toggle | No | Sets railway and boundary line colors. Includes boundary dash pattern dropdown (solid/dashed/dotted/dash-dot). Extra toggle for regional boundaries. |
| 12 | Labels | Color pickers (13) + 5 toggles | No | Sets colors for all label types and their halos: city, country, state, subplace, major/minor road, ocean, address. Extra toggles for highway shields, one-way arrows, lake/waterway/island labels. |
| 13 | POIs | Nested color pickers (8) | No | Sets colors for 8 POI categories: shopping, nature, transport, attractions, general (red), civic, food & drink, general (turquoise). Includes POI icons on/off toggle. |
| 14 | Line Widths | Sliders (6) | No | Sets per-road-type width multipliers: highways, major, minor, service, other (0–3x each), plus boundaries (0.2–3x). |
| 15 | Label Styles | Per-category controls (5) | No | Per label category (country, city, state, road, water): text size multiplier (0.5–2x), halo width (0–3), text case (default/UPPERCASE/normal). |
| 16 | Fonts | Dropdowns (2) | No | Glyph CDN selector (Protomaps/UNDP) and font family selector (3 Protomaps fonts, 8 UNDP fonts). |
| 17 | Language | Dropdown | No | Language selector for base map labels. 41 ISO language codes supported. |
| 18 | Focus Colors | Color pickers + sliders | Yes | Focus mode overlay colors: mask, target fill/border/width, admin1 color/width/style, neighbor fill/border/admin1. Only visible when editing a focus theme. |
| 19 | Focus City Markers & Labels | Color pickers + sliders | Yes | Focus mode city marker and label defaults: marker size/color/border, label size/color/halo/position. Only visible when editing a focus theme. |
| 20 | Marker Color Scheme | Dropdown | No | Selects the default marker color palette for the theme: standard, pitchbook, slate, slateGreyLight, warm. |
| 21 | Marker & Label Defaults | Enable checkbox + controls | No | Optional theme-level marker defaults: scale, border, numbers, label size/color/halo, position, background. Enable checkbox to include; leave unchecked for system defaults. |
| 22 | Highway Shield Defaults | Enable checkbox + controls | No | Optional theme-level shield styling: text color, text size (0.5–2x), icon size (0.5–2x). Enable checkbox to include; leave unchecked for system defaults. |