{"id":15034077,"url":"https://github.com/elemefe/vue-amap","last_synced_at":"2025-04-10T17:15:17.412Z","repository":{"id":37664118,"uuid":"70445310","full_name":"ElemeFE/vue-amap","owner":"ElemeFE","description":"🌍  基于 Vue 2.x 和高德地图的地图组件 ","archived":false,"fork":false,"pushed_at":"2022-12-07T23:04:30.000Z","size":3709,"stargazers_count":3367,"open_issues_count":243,"forks_count":584,"subscribers_count":103,"default_branch":"dev","last_synced_at":"2025-04-09T18:48:10.118Z","etag":null,"topics":["amap","component-library","javascript","vue"],"latest_commit_sha":null,"homepage":"https://elemefe.github.io/vue-amap/","language":"JavaScript","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/ElemeFE.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-10T02:36:37.000Z","updated_at":"2025-03-26T07:38:08.000Z","dependencies_parsed_at":"2023-01-24T23:45:45.448Z","dependency_job_id":null,"html_url":"https://github.com/ElemeFE/vue-amap","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElemeFE%2Fvue-amap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElemeFE%2Fvue-amap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElemeFE%2Fvue-amap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElemeFE%2Fvue-amap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ElemeFE","download_url":"https://codeload.github.com/ElemeFE/vue-amap/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248261916,"owners_count":21074225,"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","component-library","javascript","vue"],"created_at":"2024-09-24T20:23:50.706Z","updated_at":"2025-04-10T17:15:17.391Z","avatar_url":"https://github.com/ElemeFE.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://cdn.rawgit.com/ElemeFE/vue-amap/master/src/docs/assets/images/logo.png\"\u003e\n\u003c/p\u003e\n\n# vue-amap\n[![Build Status](https://travis-ci.org/ElemeFE/vue-amap.svg?branch=master)](https://travis-ci.org/ElemeFE/vue-amap)\n[![npm package](https://img.shields.io/npm/v/vue-amap.svg)](https://www.npmjs.org/package/vue-amap)\n[![NPM downloads](http://img.shields.io/npm/dm/vue-amap.svg)](https://npmjs.org/package/vue-amap)\n![JS gzip size](http://img.badgesize.io/https://unpkg.com/vue-amap/src/lib/index.js?compression=gzip\u0026label=gzip%20size:%20JS)\n[![license](https://img.shields.io/github/license/elemefe/vue-amap.svg?style=flat-square)](https://github.com/ElemeFE/vue-amap)\n[![GitHub stars](https://img.shields.io/github/stars/elemefe/vue-amap.svg?style=social\u0026label=Star)](https://github.com/ElemeFE/vue-amap)\n\n\u003e vue-amap是一套基于Vue 2.0和高德地图的地图组件。\n\n## 安装\n```\nnpm install -S vue-amap\n```\n\n## 文档\n[https://elemefe.github.io/vue-amap](https://elemefe.github.io/vue-amap)\n\n\n## 快速上手\n\n引入vue-amap\n\n```javascript\n// 引入vue-amap\nimport VueAMap from 'vue-amap';\nVue.use(VueAMap);\n\n// 初始化vue-amap\nVueAMap.initAMapApiLoader({\n  // 高德的key\n  key: 'YOUR_KEY',\n  // 插件集合\n  plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor'],\n  // 高德 sdk 版本，默认为 1.4.4\n  v: '1.4.4'\n});\n```\n\n## 组件\n\n### 地图\n\n```vue\n\u003cel-amap vid=\"amapDemo\" :zoom=\"zoom\" :center=\"center\"\u003e\n\u003c/el-amap\u003e\n```\n\n### 点坐标\n\n```vue\n\u003cel-amap vid=\"amapDemo\" :zoom=\"zoom\" :center=\"center\"\u003e\n  \u003cel-amap-marker v-for=\"marker in markers\" :position=\"marker.position\"\u003e\u003c/el-amap-marker\u003e\n\u003c/el-amap\u003e\n```\n\n### 折线\n\n```vue\n\u003cel-amap vid=\"amapDemo\" :zoom=\"zoom\" :center=\"center\"\u003e\n  \u003cel-amap-polyline :path=\"polyline.path\"\u003e\u003c/el-amap-polyline\u003e\n\u003c/el-amap\u003e\n```\n\n### 多边形\n\n```vue\n\u003cel-amap vid=\"amapDemo\" :zoom=\"zoom\" :center=\"center\"\u003e\n  \u003cel-amap-polygon v-for=\"polygon in polygons\" :path=\"polygon.path\" :events=\"polygon.events\"\u003e\u003c/el-amap-polygon\u003e\n\u003c/el-amap\u003e\n```\n\n### 圆\n\n```vue\n\u003cel-amap vid=\"amapDemo\" :zoom=\"zoom\" :center=\"center\"\u003e\n  \u003cel-amap-circle v-for=\"circle in circles\" :center=\"circle.center\" :radius=\"circle.radius\"\u003e\u003c/el-amap-circle\u003e\n\u003c/el-amap\u003e\n```\n\n### 图片覆盖物\n\n```vue\n\u003cel-amap vid=\"amapDemo\" :zoom=\"zoom\" :center=\"center\"\u003e\n  \u003cel-amap-ground-image v-for=\"groundimage in groundimages\" :url=\"groundimage.url\"\u003e\u003c/el-amap-ground-image\u003e\n\u003c/el-amap\u003e\n```\n\n### 文本\n\n```vue\n\u003cel-amap vid=\"amapDemo\" :zoom=\"zoom\" :center=\"center\"\u003e\n  \u003cel-amap-text v-for=\"text in texts\"\u003e\u003c/el-amap-text\u003e\n\u003c/el-amap\u003e\n```\n\n### 贝塞尔曲线\n\n```vue\n\u003cel-amap vid=\"amapDemo\" :zoom=\"zoom\" :center=\"center\"\u003e\n  \u003cel-amap-bezier-curve v-for=\"line in lines\"\u003e\u003c/el-amap-bezier-curve\u003e\n\u003c/el-amap\u003e\n```\n\n### 圆点标记\n\n```vue\n\u003cel-amap vid=\"amapDemo\" :zoom=\"zoom\" :center=\"center\"\u003e\n  \u003cel-amap-circle-marker v-for=\"marker in markers\"\u003e\u003c/el-amap-circle-marker\u003e\n\u003c/el-amap\u003e\n```\n\n### 椭圆\n\n```vue\n\u003cel-amap vid=\"amapDemo\" :zoom=\"zoom\" :center=\"center\"\u003e\n  \u003cel-amap-ellipse v-for=\"ellipse in ellipses\"\u003e\u003c/el-amap-ellipse\u003e\n\u003c/el-amap\u003e\n```\n\n### 矩形\n\n```vue\n\u003cel-amap vid=\"amapDemo\" :zoom=\"zoom\" :center=\"center\"\u003e\n  \u003cel-amap-rectangle v-for=\"rectangle in rectangles\"\u003e\u003c/el-amap-rectangle\u003e\n\u003c/el-amap\u003e\n```\n\n### 信息窗体\n\n```vue\n\u003cel-amap vid=\"amapDemo\" :zoom=\"zoom\" :center=\"center\"\u003e\n  \u003cel-amap-info-window v-for=\"window in windows\" :position=\"window.position\" :content=\"window.content\" :open=\"window.open\"\u003e\u003c/el-amap-info-window\u003e\n\u003c/el-amap\u003e\n```\n\n### Search-Box\n\n```vue\n\u003cel-amap-search-box class=\"search-box\" :search-option=\"searchOption\" :on-search-result=\"onSearchResult\"\u003e\u003c/el-amap-search-box\u003e\n\u003cel-amap vid=\"amapDemo\"\u003e\n\u003c/el-amap\u003e\n```\n\n### 其他特性\n\n* 支持自定义组件\n* 支持官方 UI 组件库\n\n## 反馈\n\n文档被大家吐槽了挺久，这段时间，针对大家的问题，对文档进行了一次升级。后续将重点持续完善「示例中心」，如果大家在使用过程中，遇到了些问题，欢迎提 issue，我们将根据大家的反馈，逐渐充实「示例中心」，更好地为大家服务。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felemefe%2Fvue-amap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felemefe%2Fvue-amap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felemefe%2Fvue-amap/lists"}