Theme Editor

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 (23 sections)

#SectionTypeFocus OnlyDescription
1Base StyleRadio buttonsNoSelects 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.
2Background & EarthColor pickers (2)NoSets the fundamental background and land fill colors. These are the most visually impactful colors on the map.
3HillshadeCustom (toggle + 3 swatches + 2 sliders)NoAdds 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)
4LandcoverNested color pickers (7)NoSets terrain type colors: barren, farmland, forest, glacier, grassland, scrub, urban area. Stored as a nested landcover object in the theme's overrides.
5LanduseColor pickers (17) + togglesNoSets 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.
6WaterColor pickers (1) + 2 togglesNoSets water body color. Extra toggles for rivers and streams visibility.
7StructuresColor pickers (2) + sliderNoSets building and pier colors. Includes building opacity slider (0–1). Per-layer visibility toggles for buildings and piers.
8Road FillsColor pickers (7) + 1 toggleNoSets fill colors for 7 road types: other, minor service, minor A/B, link, major, highway. Extra toggle for railways.
9Road CasingsColor pickers (7)NoSets casing (outline) colors for road types: minor service, minor, link, major early/late, highway early/late.
10TunnelsColor pickers (10)NoSets colors for 5 tunnel casing types and 5 tunnel fill types. Master toggle hides all tunnel layers.
11BridgesColor pickers (10)NoSets colors for 5 bridge casing types and 5 bridge fill types. Master toggle hides all bridge layers.
12InfrastructureColor pickers (2) + 1 toggleNoSets railway and boundary line colors. Includes boundary dash pattern dropdown (solid/dashed/dotted/dash-dot). Extra toggle for regional boundaries.
13LabelsColor pickers (13) + 5 togglesNoSets 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.
14POIsNested color pickers (8)NoSets colors for 8 POI categories: shopping, nature, transport, attractions, general (red), civic, food & drink, general (turquoise). Includes POI icons on/off toggle.
15Line WidthsSliders (6)NoSets per-road-type width multipliers: highways, major, minor, service, other (0–3x each), plus boundaries (0.2–3x).
16Label StylesPer-category controls (5)NoPer label category (country, city, state, road, water): text size multiplier (0.5–2x), halo width (0–3), text case (default/UPPERCASE/normal).
17FontsDropdowns (2)NoGlyph CDN selector (Protomaps/UNDP) and font family selector (3 Protomaps fonts, 8 UNDP fonts).
18LanguageDropdownNoLanguage selector for base map labels. 41 ISO language codes supported.
19Focus ColorsColor pickers + slidersYesFocus mode overlay colors: mask, target fill/border/width, admin1 color/width/style, neighbor fill/border/admin1. Only visible when editing a focus theme.
20Focus City Markers & LabelsColor pickers + slidersYesFocus mode city marker and label defaults: marker size/color/border, label size/color/halo/position. Only visible when editing a focus theme.
21Marker Color SchemeDropdownNoSelects the default marker color palette for the theme: standard, pitchbook, slate, slateGreyLight, warm.
22Marker & Label DefaultsEnable checkbox + controlsNoOptional theme-level marker defaults: scale, border, numbers, label size/color/halo, position, background. Enable checkbox to include; leave unchecked for system defaults.
23Highway Shield DefaultsEnable checkbox + controlsNoOptional 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.