{"id":20037658,"url":"https://github.com/xyy94813/amap-react-components","last_synced_at":"2025-05-05T06:31:10.147Z","repository":{"id":53616595,"uuid":"275341178","full_name":"xyy94813/amap-react-components","owner":"xyy94813","description":"基于高德 JS SDK V2 的 React 组件库","archived":false,"fork":false,"pushed_at":"2024-10-23T14:13:28.000Z","size":23122,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-23T16:30:20.452Z","etag":null,"topics":["amap","amap-js","amap-react","react","react-amap"],"latest_commit_sha":null,"homepage":"https://xyy94813.github.io/amap-react-components/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xyy94813.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"Contributing.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://afdian.net/a/roxom"]}},"created_at":"2020-06-27T09:39:27.000Z","updated_at":"2024-10-23T14:12:45.000Z","dependencies_parsed_at":"2023-02-18T17:30:40.369Z","dependency_job_id":"c784ed62-b516-465f-9ad8-8dc9fa4f505a","html_url":"https://github.com/xyy94813/amap-react-components","commit_stats":{"total_commits":71,"total_committers":1,"mean_commits":71.0,"dds":0.0,"last_synced_commit":"9db14daca396a661d0a1568d3bba5ed090979802"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyy94813%2Famap-react-components","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyy94813%2Famap-react-components/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyy94813%2Famap-react-components/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyy94813%2Famap-react-components/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xyy94813","download_url":"https://codeload.github.com/xyy94813/amap-react-components/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224428642,"owners_count":17309552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amap","amap-js","amap-react","react","react-amap"],"created_at":"2024-11-13T10:20:53.814Z","updated_at":"2024-11-13T10:20:54.448Z","avatar_url":"https://github.com/xyy94813.png","language":"TypeScript","funding_links":["https://afdian.net/a/roxom"],"categories":[],"sub_categories":[],"readme":"# amap-react-components\n\n[![latest version](https://img.shields.io/npm/v/amap-react-components.svg?label=latest%20%20version)](https://www.npmjs.org/package/amap-react-components)\n[![License](https://img.shields.io/npm/l/amap-react-components?label=latest%20%20version%20%20license)](https://www.npmjs.org/package/amap-react-components)\n[![npm downloads](https://img.shields.io/npm/dm/amap-react-components.svg)](http://npmjs.com/amap-react-components)\n[![minimized gzipped size](https://img.shields.io/bundlejs/size/amap-react-components)](http://npmjs.com/amap-react-components)\n\n[![GitHub Repo stars](https://img.shields.io/github/stars/xyy94813/amap-react-components?label=github%20%20stars)](https://github.com/xyy94813/amap-react-components)\n[![last commit (branch)](https://img.shields.io/github/last-commit/xyy94813/amap-react-components/main)](https://github.com/xyy94813/amap-react-components)\n\n[![deploy-to-gh-pages](https://github.com/xyy94813/amap-react-components/actions/workflows/deploy-to-gh-pages.yml/badge.svg?branch=main)](https://github.com/xyy94813/amap-react-components/actions/workflows/deploy-to-gh-pages.yml)\n[![Codecov workflow](https://github.com/xyy94813/amap-react-components/actions/workflows/codecov.yml/badge.svg?branch=main)](https://github.com/xyy94813/amap-react-components/actions/workflows/codecov.yml)\n[![codecov](https://codecov.io/gh/xyy94813/amap-react-components/branch/main/graph/badge.svg?token=DCC845JGZW)](https://codecov.io/gh/xyy94813/amap-react-components)\n\n[AMap](https://lbs.amap.com/api/jsapi-v2/summary/) 的 React 组件。\n\n\u003e 注意: 仅支持 AMap V2 且 React \u003e= 16.8.\n\n## 对比其他库\n\n|                  | amap-react-components | @amap/amap-react | react-amap        |\n| ---------------- | --------------------- | ---------------- | ----------------- |\n| 官方             | ❌                    | ✅               | ❌ （饿了么团队） |\n| 开源             | ✅                    | ❌               | ✅                |\n| 活跃度           | 较高                  | 低               | 低                |\n| 使用文档         | ✅                    | ✅               | ✅                |\n| 单元测试覆盖率   | 高                    | ❓               | ❌                |\n| 基于 React Hooks | ✅                    | ❓               | ❌                |\n| 支持 amap v2     | ✅                    | ✅               | ❌                |\n| 支持 amap ui     | ✅                    | ✅               | ✅                |\n| 支持 TS          | ✅                    | ✅               | ✅                |\n| 支持 Vite        | ✅                    | ❓               | ❓                |\n| 自定义组件       | ✅                    | ✅               | ✅                |\n| UMD 模块         | ✅                    | ❓               | ✅                |\n\n- [@amap/amap-react](https://www.npmjs.com/package/@amap/amap-react) （高德官方 react 组件 ）\n- [react-amap](https://github.com/elemefe/react-amap)\n\n## 使用\n\n### 安装\n\n```\nyarn add amap-react-components\n// or\n// npm i amap-react-components\n```\n\n### Browser\n\n提供 browser 后缀支持 UMD 模块\n\n例如：\n\n```\nhttps://cdn.jsdelivr.net/npm/amap-react-components@0.0.1/dist/amap-react-components.browser.js\n```\n\n### 示例及 API\n\n[各组件示例](https://xyy94813.github.io/amap-react-components)\n\n### Typescript\n\n安装 jsapi 的 ts 声明\n\n```shell\nnpm install amap-jsapi-v2-types -D\n```\n\n由于官方 ts 声明存在声明错误、缺漏，以及缺少 AMapUI 相关接口声明，甚至官方文档存在错误等问题\n\n自定义组件时，可以参考[此文件](https://github.com/xyy94813/amap-react-components/blob/main/src/%40types/AMap.d.ts) 对其类型扩展\n\n并及时给 `amap-jsapi-v2-types` 提 PR。\n\n### Polyfill\n\n使用者可能需要自行处理以下兼容性\n\n- [Proxy](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Proxy)\n  --\u003e [Proxy Polyfill](https://github.com/GoogleChrome/proxy-polyfill)\n\n## 贡献指南\n\n查看[贡献指南](./Contributing.md)\n\n## 变更日志\n\n查看[变更日志](./CHANGELOG.md)\n\n## LICENSE\n\n[MIT LICENSE](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyy94813%2Famap-react-components","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxyy94813%2Famap-react-components","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyy94813%2Famap-react-components/lists"}