• Stars
    star
    3,320
  • Rank 13,507 (Top 0.3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 8 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🌍 基于 Vue 2.x 和高德地图的地图组件

vue-amap

Build Status npm package NPM downloads JS gzip size license GitHub stars

vue-amap是一套基于Vue 2.0和高德地图的地图组件。

安装

npm install -S vue-amap

文档

https://elemefe.github.io/vue-amap

快速上手

引入vue-amap

// 引入vue-amap
import VueAMap from 'vue-amap';
Vue.use(VueAMap);

// 初始化vue-amap
VueAMap.initAMapApiLoader({
  // 高德的key
  key: 'YOUR_KEY',
  // 插件集合
  plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor'],
  // 高德 sdk 版本,默认为 1.4.4
  v: '1.4.4'
});

组件

地图

<el-amap vid="amapDemo" :zoom="zoom" :center="center">
</el-amap>

点坐标

<el-amap vid="amapDemo" :zoom="zoom" :center="center">
  <el-amap-marker v-for="marker in markers" :position="marker.position"></el-amap-marker>
</el-amap>

折线

<el-amap vid="amapDemo" :zoom="zoom" :center="center">
  <el-amap-polyline :path="polyline.path"></el-amap-polyline>
</el-amap>

多边形

<el-amap vid="amapDemo" :zoom="zoom" :center="center">
  <el-amap-polygon v-for="polygon in polygons" :path="polygon.path" :events="polygon.events"></el-amap-polygon>
</el-amap>

<el-amap vid="amapDemo" :zoom="zoom" :center="center">
  <el-amap-circle v-for="circle in circles" :center="circle.center" :radius="circle.radius"></el-amap-circle>
</el-amap>

图片覆盖物

<el-amap vid="amapDemo" :zoom="zoom" :center="center">
  <el-amap-ground-image v-for="groundimage in groundimages" :url="groundimage.url"></el-amap-ground-image>
</el-amap>

文本

<el-amap vid="amapDemo" :zoom="zoom" :center="center">
  <el-amap-text v-for="text in texts"></el-amap-text>
</el-amap>

贝塞尔曲线

<el-amap vid="amapDemo" :zoom="zoom" :center="center">
  <el-amap-bezier-curve v-for="line in lines"></el-amap-bezier-curve>
</el-amap>

圆点标记

<el-amap vid="amapDemo" :zoom="zoom" :center="center">
  <el-amap-circle-marker v-for="marker in markers"></el-amap-circle-marker>
</el-amap>

椭圆

<el-amap vid="amapDemo" :zoom="zoom" :center="center">
  <el-amap-ellipse v-for="ellipse in ellipses"></el-amap-ellipse>
</el-amap>

矩形

<el-amap vid="amapDemo" :zoom="zoom" :center="center">
  <el-amap-rectangle v-for="rectangle in rectangles"></el-amap-rectangle>
</el-amap>

信息窗体

<el-amap vid="amapDemo" :zoom="zoom" :center="center">
  <el-amap-info-window v-for="window in windows" :position="window.position" :content="window.content" :open="window.open"></el-amap-info-window>
</el-amap>

Search-Box

<el-amap-search-box class="search-box" :search-option="searchOption" :on-search-result="onSearchResult"></el-amap-search-box>
<el-amap vid="amapDemo">
</el-amap>

其他特性

  • 支持自定义组件
  • 支持官方 UI 组件库

反馈

文档被大家吐槽了挺久,这段时间,针对大家的问题,对文档进行了一次升级。后续将重点持续完善「示例中心」,如果大家在使用过程中,遇到了些问题,欢迎提 issue,我们将根据大家的反馈,逐渐充实「示例中心」,更好地为大家服务。

More Repositories

1

element

A Vue.js 2.0 UI Toolkit for Web
Vue
54,115
star
2

mint-ui

Mobile UI elements for Vue.js
Vue
16,570
star
3

node-interview

How to pass the Node.js interview of ElemeFE.
HTML
10,407
star
4

v-charts

基于 Vue2.0 和 ECharts 封装的图表组件📈📊
JavaScript
6,802
star
5

element-react

Element UI
JavaScript
2,832
star
6

vue-infinite-scroll

An infinite scroll directive for vue.js.
JavaScript
2,828
star
7

page-skeleton-webpack-plugin

Webpack plugin to generate the skeleton page automatically
JavaScript
2,748
star
8

cooking

👨‍🍳 更易上手的前端构建工具
JavaScript
1,948
star
9

node-practice

Node.js 实践教程
JavaScript
1,374
star
10

restc

A server-side middleware to visualize REST requests.
HTML
1,348
star
11

react-amap

基于 React 封装的高德地图组件。AMap Component Based On React.
JavaScript
1,031
star
12

vue-swipe

A touch slider for vue.js.
Vue
929
star
13

vue-desktop

A UI library for building admin panel website.
Vue
550
star
14

element-angular

Element for Angular
TypeScript
522
star
15

hire

寻找热爱生活,把世界变的更好的人
468
star
16

keynote

大前端分享会公开演示文稿
HTML
335
star
17

image-cropper

A image cropper for cropping user avatar, no dependencies.
JavaScript
311
star
18

postcss-salad

沙拉是一个能够帮助你写出更加简洁、优雅的CSS的样式解决方案
CSS
275
star
19

vscode-element-helper

VSCode-Element-Helper is a VS Code package for Element-UI.
TypeScript
240
star
20

smart-gesture

这是一个小型手势组件,支持普通的方向手势和自定义图形手势,兼容PC端和移动端,可以非常方便的用它实现一些酷炫的手势操作。
JavaScript
238
star
21

vue-msgbox

A message box (like Sweet Alert) for vue.js.
JavaScript
236
star
22

bowl

🍚 static resources front-end storage solving strategy
JavaScript
227
star
23

style-guide

style guide for everyone
226
star
24

element-dashboard

element dashboard
Vue
222
star
25

weex-vue-starter-kit

weex starter kit in vue to use weexpack & weex both.(support hot-reload)
JavaScript
179
star
26

obsolete-webpack-plugin

🌈 A Webpack plugin generates a browser-side standalone script that detects browser compatibility based on `Browserslist` and prompts website users to upgrade it.
JavaScript
176
star
27

vue-toast-mobile

A mobile toast plugin for vue.js
HTML
144
star
28

eslint-config-elemefe

JavaScript
136
star
29

vue-img

hash2path wrapper for vue.js
JavaScript
117
star
30

mongodb-doc-cn

Mongodb 中文文档, 在线阅读 ->
101
star
31

Hachart

HaHa, this is a flowchart generator.
JavaScript
92
star
32

vue-popup

A popup mixin for vue.js
JavaScript
77
star
33

element-helper

🚀 Element-Helper is a Atom package for Element-UI.
JavaScript
75
star
34

crayfish

基于 CDN 的配置管理系统
JavaScript
58
star
35

webspoon

这是一个 Web 前端工程化的工具包
JavaScript
45
star
36

random

一个随机分组的小工具
HTML
44
star
37

ng-staticize

Staticize your angular template. Zero watcher and fast as template engine.
JavaScript
38
star
38

v-datepicker

基于Vue指令实现的一个日历选择器控件
Vue
33
star
39

clouding

前端「零机器」部署方案
32
star
40

WAI-ARIA-Practices

ARIA实践指南(中文版)
25
star
41

react-native-smart-gesture

smart-gesture for react-native.
JavaScript
24
star
42

image-cropper-touch

A image cropper for mobile device.
JavaScript
15
star
43

vue-smart-gesture

smart-gesture for vue.
JavaScript
15
star
44

vue-desktop-starter

A starter for vue-desktop.
JavaScript
13
star
45

hasaki

A file generator for easy writing your application.
JavaScript
8
star
46

react-smart-gesture

smart-gesture for react.
JavaScript
7
star
47

appCacheReload

JavaScript
5
star
48

element-migration-helper

CLI tool to aid in migration from Element-UI 1.x to 2.0
JavaScript
3
star
49

snapshot

JavaScript
2
star
50

pocket-noodles

A WEB API CACHING SOLUTION
JavaScript
2
star
51

sip

1
star