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, 98 color pickers (all 87 Protomaps flavor properties plus 11 pitchmappr-added color keys), 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 (26 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 | Hillshade | Custom (toggle + 3 swatches + 2 sliders) | No | Adds a raster-DEM hillshade layer beneath landcover for shaded relief. Enable toggle, shadow/highlight/accent color swatches, illumination direction (0–359°), exaggeration (0–1). Tile source: AWS Open Data Mapzen Terrarium routed through the terrain-proxy.pmppr.workers.dev Cloudflare Worker. Source/layer omitted entirely when disabled — zero perf cost on themes that don't use hillshade. (v0.9.30) |
| 4 | 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. |
| 5 | 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. |
| 6 | Water | Color pickers (1) + 2 toggles | No | Sets water body color. Extra toggles for rivers and streams visibility. |
| 7 | 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. |
| 8 | 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. |
| 9 | Road Casings | Color pickers (7) | No | Sets casing (outline) colors for road types: minor service, minor, link, major early/late, highway early/late. |
| 10 | Tunnels | Color pickers (10) | No | Sets colors for 5 tunnel casing types and 5 tunnel fill types. Master toggle hides all tunnel layers. |
| 11 | Bridges | Color pickers (10) | No | Sets colors for 5 bridge casing types and 5 bridge fill types. Master toggle hides all bridge layers. |
| 12 | Infrastructure | Color pickers (3) + 1 toggle | No | Sets railway, boundary, and country-boundary-override line colors. Includes boundary dash pattern dropdown (solid/dashed/dotted/dash-dot). Extra toggle for regional boundaries. |
| 13 | Labels | Color pickers (15) + 5 toggles | No | Sets colors for all label types and their halos: city, country, state, subplace, major/minor road, ocean (no halo), address. Extra toggles for highway shields, one-way arrows, lake/waterway/island labels. |
| 14 | POI Per-Class Colors | Custom (per-kind match) | No | Per-POI-kind color overrides layered on top of the 8 bucket colors in the POIs section. |
| 15 | Zoom-Interpolated Colors | Custom | No | Lets selected color keys take a {low, high, lowZ, highZ} object instead of a flat hex, producing a MapLibre zoom interpolation so the color shifts as you zoom. |
| 16 | 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. |
| 17 | Line Widths | Sliders (7) | No | Sets per-road-type width multipliers: highways, major, minor, service, other, plus boundaries and a country-boundary override (0–3x each). |
| 18 | Layer Opacity | Sliders (2) | No | Per-category fill-opacity overrides for landcover and parks (0–1, default 1). |
| 19 | 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). |
| 20 | Fonts | Dropdowns (2) | No | Glyph CDN selector (Protomaps/UNDP) and font family selector (3 Protomaps fonts, 8 UNDP fonts). |
| 21 | Language | Dropdown | No | Language selector for base map labels. 41 ISO language codes supported. |
| 22 | 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. |
| 23 | 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. |
| 24 | Marker Color Scheme | Dropdown | No | Selects the default marker color palette for the theme: standard, pitchbook, slate, slateGreyLight, warm. |
| 25 | 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. |
| 26 | 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. |