漂亮的地图组件。100%免费,零配置,一个命令设置。
概览
免费且开源,现成可用,可自定义的React地图组件。零配置。一个命令设置。基于MapLibre GL,采用Tailwind样式,与shadcn/ui无缝兼容。 - 🎨 — 自动适应明暗模式 - 🎯 — 开箱即用,默认设置合理 - 📦 — 使用相同的图案和样式惯例 - 🗺️ — 完全访问MapLibre强大的地图功能 - 🧩 构建复杂地图UI,包含简单声明式组件 - 📍 丰富的标记系统,包含弹出窗口、提示和标签 - 🛤️ - 在地图上绘制路线和路径 - 🎮 - 放大、指南针、定位和全屏控制 教你的编码代理(Claude Code、Cursor、Codex 等)如何使用 mapcn: 然后要求地图,或者问问你应用中地图的位置。详见 mapcn.dev/docs/skill。 该项目使用基于OpenStreetMap数据的CARTO底图。 - : 需要CARTO Enterprise许可证。请求演示以获取价格详情。- : 根据其底图条款,CARTO受助者免费使用。
概述(AI 翻译)
MAPCN
免费开源、现成且可自定义的React地图组件。 零配置。一个命令设置。基于MapLibre GL,搭配Tailwind风格,与shadcn/ui无缝兼容。
入门指南 · 安装 · 组成部分
特色
- 🎨 主题感知 — 自动适应光暗模式
- 🎯 零配置 — 开箱即用,默认配置合理
- 📦 shadcn/ui兼容 — 使用相同的图案和样式规范
- 🗺️ MapLibre GL 支持 — 完全访问 MapLibre 强大的制图功能
- 🧩 可组合 — 构建带有简单声明组件的复杂地图界面
- 📍 标记与弹出窗口 — 丰富的标记系统,包含弹出窗口、提示和标签
- 🛤️ 路线 — 在地图上绘制路线和路径
- 🎮 控制键 — 缩放、指南针、定位和全屏控制
斯基尔特工
教你的编码代理(Claude Code、Cursor、Codex 等)如何使用 mapcn:
然后要求地图,或者问问你应用中地图的位置。详见 mapcn.dev/docs/skill。
底图服务条款
mapcn 默认样式和示例使用 CARTO Basemaps,基于 OpenStreetMap 数据。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
mapcn
Free & open-source, ready-to-use, customizable map components for React. Zero config. One command setup. Built on MapLibre GL, styled with Tailwind, works seamlessly with shadcn/ui.
Get Started · Installation · Components
Features
- 🎨 Theme-aware — Automatically adapts to light/dark mode
- 🎯 Zero config — Works out of the box with sensible defaults
- 📦 shadcn/ui compatible — Uses the same patterns and styling conventions
- 🗺️ MapLibre GL powered — Full access to MapLibre’s powerful mapping capabilities
- 🧩 Composable — Build complex map UIs with simple, declarative components
- 📍 Markers & Popups — Rich marker system with popups, tooltips, and labels
- 🛤️ Routes — Draw routes and paths on your maps
- 🎮 Controls — Zoom, compass, locate, and fullscreen controls
Agent Skill
Teach your coding agent (Claude Code, Cursor, Codex, …) how to use mapcn:
npx skills add AnmolSaini16/mapcn
Then ask for a map, or ask where one would fit in your app. See mapcn.dev/docs/skill.
Basemap Terms of Service
mapcn uses CARTO Basemaps powered by OpenStreetMap data for its default styles and examples.
CARTO offers free tiers for commercial and non-commercial usage, subject to monthly tile request limits and attribution requirements.
- Commercial use: Free up to 1 million tile requests per month.
- Non-commercial use: Free up to 5 million tile requests per month.
- Attribution: CARTO and OpenStreetMap attribution must remain visible.
- API keys: CARTO requires API keys for raster basemaps and may extend this requirement to vector basemaps.
For production applications, review CARTO’s terms and configure your own basemap provider or API key as needed.
mapcn is built on MapLibre and supports alternative MapLibre-compatible basemap providers.
Sponsors
mapcn is free and open source, kept going by its sponsors. Want your logo here? See mapcn.dev/sponsors.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature)
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add anmolsaini16/mapcn