# CircleMarker
# 使用
<amap>
<amap-circle-marker :center="[x, y]" :radius="20" />
</amap>
1
2
3
2
3
# Props
属性名 | 类型 | 备注 |
---|---|---|
center | number[2] | 支持.sync |
radius | number | 单位是像素,支持.sync |
zIndex | number | |
bubble | boolean | |
cursor | string | |
strokeColor | string | |
strokeOpacity | number | |
strokeWeight | number | |
fillColor | string | |
fillOpacity | string | |
visible | boolean | |
clickable | boolean | |
draggable | boolean | |
extraOptions | object | 其它未在上面列出的属性,仅支持单次绑定 |
# Events
事件名 | 备注 |
---|---|
click | |
dblclick | |
rightclick | |
mousemove | |
mouseover | |
mouseout | |
mousedown | |
mouseup | |
dragstart | |
dragging | |
dragend | |
moving | |
moveend | |
movealong | |
touchstart | |
touchmove | |
touchend |
# Example
<template>
<demo-view>
<template v-slot:control>
<a-form-item label="center">
<a-input read-only :value="center.join(',')" style="width: 180px;" />
</a-form-item>
<a-form-item label="radius">
<a-slider v-model="radius" :min="10" :max="100" style="width: 180px;" />
</a-form-item>
</template>
<template v-slot:map-content>
<amap-circle-marker
:center.sync="center"
:radius="radius"
:fill-color="fill"
:fill-opacity="0.5"
:stroke-color="stroke"
cursor="pointer"
draggable
/>
</template>
</demo-view>
</template>
<script>
export default {
data() {
return {
center: [116.473571, 39.993083],
radius: 20,
fill: '#409EFF',
stroke: '#000A58',
};
},
};
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36