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:
- Most important: POIs, user location, route highlights
- Secondary: Major roads, city labels, landmarks
- Tertiary: Minor streets, administrative boundaries
- Background: Water, land use, terrain
Implementation:
- Use size, color intensity, and contrast to establish hierarchy
- Primary features: high contrast, larger symbols, bold colors
- Background features: low contrast, muted colors, smaller text
Color Theory for Maps
Color Harmony:
- Analogous colors: Use colors next to each other on color wheel (blue-green-teal) for cohesive designs
- Complementary colors: Use opposite colors (blue/orange, red/green) for high contrast emphasis
- Monochromatic: Single hue with varying saturation/brightness for elegant, minimal designs
Color Psychology:
- Blue: Water, trust, calm, professional (default for water bodies)
- Green: Parks, nature, growth, eco-friendly (vegetation, parks)
- Red/Orange: Urgent, important, dining (alerts, restaurants)
- Yellow: Caution, highlight, attention (warnings, selected items)
- Gray: Neutral, background, roads (infrastructure)
Accessibility:
- Ensure 4.5:1 contrast ratio for text (WCAG AA)
- Don't rely solely on color to convey information
- Test designs with colorblind simulators
- Avoid red/green combinations for critical distinctions
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:
- Sans-serif (Roboto, Open Sans): Modern, clean, high legibility at small sizes - use for labels
- Serif (Noto Serif): Traditional, formal - use sparingly for titles or historic maps
- Monospace: Technical data, coordinates
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:
- Point labels: Center or slightly offset (avoid overlap with symbol)
- Line labels: Follow line curve, repeat for long features
- Area labels: Center in polygon, sized appropriately
- Prioritize: Major features get labels first, minor features labeled if space allows
Zoom Level Strategy
Zoom 0-4 (World to Continent):
- Major country boundaries
- Ocean and sea labels
- Capital cities only
Zoom 5-8 (Country to State):
- State/province boundaries
- Major cities
- Major highways
- Large water bodies
Zoom 9-11 (Metro Area):
- City boundaries
- Neighborhoods
- All highways and major roads
- Parks and landmarks
Zoom 12-15 (Neighborhood):
- All streets
- Building footprints
- POIs (restaurants, shops)
- Street names
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):
- All detail
- House numbers
- Parking lots
- Fine-grained POIs
Mapbox-Specific Implementation Guidance
Style Layer Best Practices
Layer Ordering (bottom to top):
- Background (solid color or pattern)
- Landuse (parks, residential, commercial)
- Water bodies (oceans, lakes, rivers)
- Terrain/hillshade (if using elevation)
- Buildings (3D or 2D footprints)
- Roads (highways → local streets)
- Borders (country, state lines)
- Labels (place names, street names)
- POI symbols
- 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:
- General public: Simplify, use familiar patterns (Google/Apple style)
- Technical users: Include more detail, technical layers, data precision
- Domain experts: Show specialized data, use domain-specific symbology
Platform Considerations:
- Mobile: Larger touch targets (44x44px minimum), simpler designs, readable at arm's length
- Desktop: Can include more detail, hover interactions, complex overlays
- Print: Higher contrast, larger text, consider CMYK color space
- Outdoor/Bright: Higher contrast, avoid subtle grays
Use Case Optimization:
- Navigation: Emphasize roads, clear hierarchy, route visibility
- Data visualization: Muted base map, let data stand out
- Storytelling: Guide viewer attention, establish mood with colors
- Location selection: Show POIs clearly, provide context
- Analysis: Include relevant layers, maintain clarity at different zooms
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 avoid
When to Use This Skill
Invoke this skill when:
- Designing a new map style
- Choosing colors for map elements
- Making decisions about visual hierarchy
- Optimizing for specific use cases
- Troubleshooting visibility issues
- Ensuring accessibility
- Creating themed maps (dark mode, vintage, etc.)
1---2name: mapbox-cartography3description: 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.4---56# Mapbox Cartography Skill78This skill provides expert cartographic knowledge to help you design effective, beautiful, and functional maps using Mapbox.910## Core Cartographic Principles1112### Visual Hierarchy1314Maps must guide the viewer's attention to what matters most:1516- **Most important**: POIs, user location, route highlights17- **Secondary**: Major roads, city labels, landmarks18- **Tertiary**: Minor streets, administrative boundaries19- **Background**: Water, land use, terrain2021**Implementation:**2223- Use size, color intensity, and contrast to establish hierarchy24- Primary features: high contrast, larger symbols, bold colors25- Background features: low contrast, muted colors, smaller text2627### Color Theory for Maps2829**Color Harmony:**3031- **Analogous colors**: Use colors next to each other on color wheel (blue-green-teal) for cohesive designs32- **Complementary colors**: Use opposite colors (blue/orange, red/green) for high contrast emphasis33- **Monochromatic**: Single hue with varying saturation/brightness for elegant, minimal designs3435**Color Psychology:**3637- **Blue**: Water, trust, calm, professional (default for water bodies)38- **Green**: Parks, nature, growth, eco-friendly (vegetation, parks)39- **Red/Orange**: Urgent, important, dining (alerts, restaurants)40- **Yellow**: Caution, highlight, attention (warnings, selected items)41- **Gray**: Neutral, background, roads (infrastructure)4243**Accessibility:**4445- Ensure 4.5:1 contrast ratio for text (WCAG AA)46- Don't rely solely on color to convey information47- Test designs with colorblind simulators48- Avoid red/green combinations for critical distinctions4950**Color Palette Templates:**5152Light Theme (Day/Professional):5354```json55{56 "background": "#f5f5f5",57 "water": "#a0c8f0",58 "parks": "#d4e7c5",59 "roads": "#ffffff",60 "buildings": "#e0e0e0",61 "text": "#333333"62}63```6465Dark Theme (Night Mode):6667```json68{69 "background": "#1a1a1a",70 "water": "#0d47a1",71 "parks": "#2e7d32",72 "roads": "#3a3a3a",73 "buildings": "#2d2d2d",74 "text": "#ffffff"75}76```7778> **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.7980High Contrast (Accessibility):8182```json83{84 "background": "#000000",85 "water": "#0066ff",86 "parks": "#00ff00",87 "roads": "#ffffff",88 "buildings": "#808080",89 "text": "#ffffff"90}91```9293Vintage/Retro:9495```json96{97 "background": "#f4e8d0",98 "water": "#b8d4d4",99 "parks": "#c8d4a4",100 "roads": "#d4c4a8",101 "buildings": "#e4d4c4",102 "text": "#4a3828"103}104```105106### Typography at Map Scale107108**Font Selection:**109110- **Sans-serif** (Roboto, Open Sans): Modern, clean, high legibility at small sizes - use for labels111- **Serif** (Noto Serif): Traditional, formal - use sparingly for titles or historic maps112- **Monospace**: Technical data, coordinates113114**Text Sizing:**115116```117Place labels (cities, POIs): 11-14px118Street labels: 9-11px119Feature labels (parks): 10-12px120Map title: 16-20px121Attribution: 8-9px122```123124**Label Placement:**125126- Point labels: Center or slightly offset (avoid overlap with symbol)127- Line labels: Follow line curve, repeat for long features128- Area labels: Center in polygon, sized appropriately129- Prioritize: Major features get labels first, minor features labeled if space allows130131### Zoom Level Strategy132133**Zoom 0-4** (World to Continent):134135- Major country boundaries136- Ocean and sea labels137- Capital cities only138139**Zoom 5-8** (Country to State):140141- State/province boundaries142- Major cities143- Major highways144- Large water bodies145146**Zoom 9-11** (Metro Area):147148- City boundaries149- Neighborhoods150- All highways and major roads151- Parks and landmarks152153**Zoom 12-15** (Neighborhood):154155- All streets156- Building footprints157- POIs (restaurants, shops)158- Street names159160> **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.161162**Zoom 16-22** (Street Level):163164- All detail165- House numbers166- Parking lots167- Fine-grained POIs168169## Mapbox-Specific Implementation Guidance170171### Style Layer Best Practices172173**Layer Ordering (bottom to top):**1741751. Background (solid color or pattern)1762. Landuse (parks, residential, commercial)1773. Water bodies (oceans, lakes, rivers)1784. Terrain/hillshade (if using elevation)1795. Buildings (3D or 2D footprints)1806. Roads (highways → local streets)1817. Borders (country, state lines)1828. Labels (place names, street names)1839. POI symbols18410. User-generated content (routes, markers)185186> **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.187188### Map Context Considerations189190**Know Your Audience:**191192- **General public**: Simplify, use familiar patterns (Google/Apple style)193- **Technical users**: Include more detail, technical layers, data precision194- **Domain experts**: Show specialized data, use domain-specific symbology195196**Platform Considerations:**197198- **Mobile**: Larger touch targets (44x44px minimum), simpler designs, readable at arm's length199- **Desktop**: Can include more detail, hover interactions, complex overlays200- **Print**: Higher contrast, larger text, consider CMYK color space201- **Outdoor/Bright**: Higher contrast, avoid subtle grays202203**Use Case Optimization:**204205- **Navigation**: Emphasize roads, clear hierarchy, route visibility206- **Data visualization**: Muted base map, let data stand out207- **Storytelling**: Guide viewer attention, establish mood with colors208- **Location selection**: Show POIs clearly, provide context209- **Analysis**: Include relevant layers, maintain clarity at different zooms210211## Reference Files212213For detailed guidance on specific topics, load these references as needed:214215- `references/scenarios.md` — Common scenario guidance (Restaurant Finder, Real Estate, Data Visualization, Navigation)216- `references/performance-testing.md` — Performance optimization, testing checklist, and common mistakes to avoid217218## When to Use This Skill219220Invoke this skill when:221222- Designing a new map style223- Choosing colors for map elements224- Making decisions about visual hierarchy225- Optimizing for specific use cases226- Troubleshooting visibility issues227- Ensuring accessibility228- Creating themed maps (dark mode, vintage, etc.)