Merge pull request #25 from griffemi/map-color-boost

Picker map: bigger roads/labels + more color
This commit is contained in:
Emi Griffith 2026-07-11 01:22:30 -07:00 committed by GitHub
commit 25f658b8d3
2 changed files with 10 additions and 9 deletions

View file

@ -118,15 +118,14 @@
if (!map) {
map = L.map(mapEl, { worldCopyJump: true, zoomControl: true }).setView([44.5, -95], 4);
// Themed CARTO basemap (no key needed) instead of the plain gray OSM raster:
// sleek "dark matter" tiles under the app's dark theme, colorful "voyager"
// tiles under the light theme, so the picker matches whichever is active.
const dark = matchMedia("(prefers-color-scheme: dark)").matches;
const tiles = dark
? "https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png"
: "https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png";
L.tileLayer(tiles, {
subdomains: "abcd", maxZoom: 20, detectRetina: true,
// Colorful CARTO "Voyager" basemap (no key needed) instead of the plain gray
// OSM raster — used in both themes for its richer road/land/water colors.
// Requesting tiles one zoom level lower and rendering them at 512px
// (tileSize 512 + zoomOffset -1) makes roads and city labels noticeably
// larger; @2x keeps them crisp while enlarged. A saturation boost (style.css)
// pushes the colors further.
L.tileLayer("https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}@2x.png", {
subdomains: "abcd", maxZoom: 20, tileSize: 512, zoomOffset: -1,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> &copy; <a href="https://carto.com/attributions">CARTO</a>',
}).addTo(map);
// Branded accent teardrop pin (the same glyph the Find button uses), styled

View file

@ -702,6 +702,8 @@ main { max-width: 1200px; margin: 0 auto; padding: 20px 24px 60px; }
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25), 0 6px 18px rgba(0, 0, 0, .25);
}
.mp-map .leaflet-container { background: var(--surface-2); }
/* Push the CARTO Voyager colors further — bolder roads, greener parks, bluer water. */
.mp-map .leaflet-tile-pane { filter: saturate(1.35) contrast(1.05); }
/* Branded accent teardrop pin (an L.divIcon wrapping the Find-button glyph),
replacing Leaflet's default blue raster marker. */
.mp-pin { background: none; border: none; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45)); }