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, 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)

#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 (3) + 1 toggleNoSets railway, boundary, and country-boundary-override line colors. Includes boundary dash pattern dropdown (solid/dashed/dotted/dash-dot). Extra toggle for regional boundaries.
13LabelsColor pickers (15) + 5 togglesNoSets 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.
14POI Per-Class ColorsCustom (per-kind match)NoPer-POI-kind color overrides layered on top of the 8 bucket colors in the POIs section.
15Zoom-Interpolated ColorsCustomNoLets 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.
16POIsNested 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.
17Line WidthsSliders (7)NoSets per-road-type width multipliers: highways, major, minor, service, other, plus boundaries and a country-boundary override (0–3x each).
18Layer OpacitySliders (2)NoPer-category fill-opacity overrides for landcover and parks (0–1, default 1).
19Label 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).
20FontsDropdowns (2)NoGlyph CDN selector (Protomaps/UNDP) and font family selector (3 Protomaps fonts, 8 UNDP fonts).
21LanguageDropdownNoLanguage selector for base map labels. 41 ISO language codes supported.
22Focus 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.
23Focus 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.
24Marker Color SchemeDropdownNoSelects the default marker color palette for the theme: standard, pitchbook, slate, slateGreyLight, warm.
25Marker & 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.
26Highway 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.