Mapbox Cartography
by @mapbox
Expert guidance on map design principles, color theory, visual hierarchy, typography, and cartographic best practices for creating effective and beautiful ma...
clawhub install mapbox-cartographyπ About This Skill
name: mapbox-cartography description: Expert guidance on map design principles, color theory, visual hierarchy, typography, and cartographic best practices for creating effective and beautiful maps with Mapbox. Use when designing map styles, choosing colors, or making cartographic decisions.
Mapbox Cartography Skill
This skill provides expert cartographic knowledge to help you design effective, beautiful, and functional maps using Mapbox.
Core Cartographic Principles
Visual Hierarchy
Maps must guide the viewer's attention to what matters most:
Implementation:
Color Theory for Maps
Color Harmony:
Color Psychology:
Accessibility:
Color Palette Templates:
Light Theme (Day/Professional):
{
"background": "#f5f5f5",
"water": "#a0c8f0",
"parks": "#d4e7c5",
"roads": "#ffffff",
"buildings": "#e0e0e0",
"text": "#333333"
}
Dark Theme (Night Mode):
{
"background": "#1a1a1a",
"water": "#0d47a1",
"parks": "#2e7d32",
"roads": "#3a3a3a",
"buildings": "#2d2d2d",
"text": "#ffffff"
}
> Road color rule for dark themes: Roads must use neutral dark gray (#3a3a3a), visibly distinct from the background but not colored. Never style roads with amber, blue, or other hues β reserve color for app data layers (routes, markers). Colored base roads and colored data layers will compete visually. Local roads that blend into the background (#1e1e1e on #1a1a1a) create a "floating labels" problem where street names appear with no visible road beneath them.
High Contrast (Accessibility):
{
"background": "#000000",
"water": "#0066ff",
"parks": "#00ff00",
"roads": "#ffffff",
"buildings": "#808080",
"text": "#ffffff"
}
Vintage/Retro:
{
"background": "#f4e8d0",
"water": "#b8d4d4",
"parks": "#c8d4a4",
"roads": "#d4c4a8",
"buildings": "#e4d4c4",
"text": "#4a3828"
}
Typography at Map Scale
Font Selection:
Text Sizing:
Place labels (cities, POIs): 11-14px
Street labels: 9-11px
Feature labels (parks): 10-12px
Map title: 16-20px
Attribution: 8-9px
Label Placement:
Zoom Level Strategy
Zoom 0-4 (World to Continent):
Zoom 5-8 (Country to State):
Zoom 9-11 (Metro Area):
Zoom 12-15 (Neighborhood):
> Note: Mapbox's hosted Streets style defaults to showing most POIs around zoom 14. For custom styles, start POIs at zoom 12 β this is the neighborhood scale where density is manageable and users are browsing. Zoom 14 is late; zoom 10 (metro-area scale) is far too early and creates severe icon clutter.
Zoom 16-22 (Street Level):
Mapbox-Specific Implementation Guidance
Style Layer Best Practices
Layer Ordering (bottom to top):
1. Background (solid color or pattern) 2. Landuse (parks, residential, commercial) 3. Water bodies (oceans, lakes, rivers) 4. Terrain/hillshade (if using elevation) 5. Buildings (3D or 2D footprints) 6. Roads (highways β local streets) 7. Borders (country, state lines) 8. Labels (place names, street names) 9. POI symbols 10. User-generated content (routes, markers)
> Common mistake: Developers often put their app's route line or active markers _below_ POI symbols, reasoning that "POIs must stay visible." This is backwards β user-generated content (your route, selected location, user position) is the most important layer and must render above everything, including POIs. A route line that covers a POI icon is acceptable; a route obscured by POI icons is not.
Map Context Considerations
Know Your Audience:
Platform Considerations:
Use Case Optimization:
Reference Files
For detailed guidance on specific topics, load these references as needed:
references/scenarios.md β Common scenario guidance (Restaurant Finder, Real Estate, Data Visualization, Navigation)references/performance-testing.md β Performance optimization, testing checklist, and common mistakes to avoidWhen to Use This Skill
Invoke this skill when: