cartography

Build interactive maps with Leaflet, React-Leaflet, and Mapbox tiles.

26|7|Updated Apr 21, 2022
One-click install
npx skills add https://github.com/cap-collectif/cap-collectif --skill cartography-cap-collectif
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cartography
Source: https://github.com/cap-collectif/cap-collectif/tree/main/.claude/skills/cartography
Command: npx skills add https://github.com/cap-collectif/cap-collectif --skill cartography-cap-collectif

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create interactive maps by combining Leaflet with React-Leaflet to visualize markers, clusters, popups, geolocation, and Mapbox tiles.

Core Features & Use Cases

  • Interactive mapping with dynamic markers and popups
  • Marker clustering for large datasets and performant rendering
  • Geolocation and user centric view control
  • Mapbox tile integration for styled basemaps
  • Use cases include admin dashboards, customer portals, and data visualization maps

Quick Start

Create a map component with MapContainer, add a TileLayer powered by Mapbox, enable markers and optional clustering, and ensure Leaflet is loaded on the client with SSR disabled via dynamic import.

Frequently Asked Questions about cartography

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add interactive maps to a React application?

To add interactive maps to a React application, combine Leaflet with React-Leaflet to render dynamic markers, popups, and Mapbox tiles. This approach provides responsive client-side mapping with controls for map-driven data visualization.

What is the best way to handle Leaflet server-side rendering errors in React?

To resolve Leaflet server-side rendering errors in React, load Leaflet on the client by disabling SSR via dynamic imports. This prevents the server from rendering map components that require browser APIs.

How do I visualize a large dataset of markers on a Leaflet map?

To visualize a large dataset of markers on a Leaflet map, use marker clustering for performant rendering. This groups markers to ensure responsive controls and smooth visualization of large datasets.

Do I need a Mapbox access token to use React-Leaflet?

Yes, a Mapbox access token is required to integrate Mapbox tiles for styled basemaps in React-Leaflet. You also need a React setup with the Leaflet and react-leaflet libraries installed.

Can I use geolocation to center the map view on the user?

Yes, you can use geolocation to provide user-centric view control in your interactive map. This feature centers the map on the user's location for dynamic, client-side mapping in dashboards and customer portals.