mapcn README

The project's README from github.com/AnmolSaini16/mapcn. As one markdown file: README.md.

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


Vercel OSS Program

mapcn banner

Features

Basemap Terms of Service

This project uses CARTO Basemaps which are based on OpenStreetMap data.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - see the LICENSE file for details.

mapcn (AnmolSaini16/mapcn)

Searching Database…

12.3K ·GitHub
这是什么?mapcn 是一个免费开源的 React 地图组件库,基于 MapLibre GL 构建,样式与 shadcn/ui 保持一致。开箱即用,无需任何配置,就能把地图放进你的 React 应用里。
这是地图框架,还是一组 React 组件?它是组件库,不是框架。它提供可组合的 React 组件,比如标记、弹窗、路线和控件,可直接添加到现有应用中,遵循与 shadcn/ui 相同的约定。
我该怎么把它添加到项目里?mapcn 支持一条命令完成安装,采用 shadcn/ui 的注册表工作流,可将组件直接拉取到 React 项目中。
我的项目需要事先具备什么?你需要一个 React 应用(演示版基于 Next.js 构建),并且已经装好 MapLibre GL。mapcn 是构建在它之上的一层轻量、带样式的封装。
默认的地图瓦片可以免费用于商业用途吗?不可以。内置的 CARTO Basemaps 用于商业用途需要 CARTO Enterprise 许可证,仅对 CARTO 获得授权的用户在非商业项目中免费。你可以改用 OpenStreetMap、MapTiler 或 Stadia Maps 的瓦片。
开箱即用包含哪些功能?支持主题感知的地图组件,包括标记、弹窗、提示框、路线/路径,以及缩放、指南针、定位和全屏控件。所有组件都会自动适配浅色和深色模式。
为什么默认使用 CARTO 底图?CARTO Basemaps(基于 OpenStreetMap 数据)提供了开箱即用、简单易用的瓦片来源。但由于它有自己的商业条款,mapcn 允许你改用 MapTiler、Stadia Maps 或其他任何兼容 MapLibre 的服务商。
它会把我绑定在 shadcn 上吗,还是底层就是 MapLibre?它直接基于 MapLibre GL 构建,因此你可以完整使用 MapLibre 的各项地图能力。组件 API 和样式则遵循 shadcn/ui 的可组合模式。
Size
2.2 MB
Stars
12.3K
Updated
CommitOct 15
Age
9mo
Commits · 90 Days