diff --git a/kicc-ui/src/components/AMap/src/Amap.vue b/kicc-ui/src/components/AMap/src/Amap.vue
index 568dd9b3..aa99f345 100644
--- a/kicc-ui/src/components/AMap/src/Amap.vue
+++ b/kicc-ui/src/components/AMap/src/Amap.vue
@@ -20,9 +20,11 @@
});
/** 地图创建完成(动画关闭) */
const complete = (): void => {
- map && map.on('complete', () => {
- mapState.loading = false;
- });
+ if (map) {
+ map.on('complete', () => {
+ mapState.loading = false;
+ });
+ }
};
onBeforeMount(() => {
@@ -59,8 +61,7 @@
// 地图类型切换插件
map.addControl(
new AMap.MapType({
- defaultType: 1,
- showRoad: true
+ defaultType: 0
})
);
});
@@ -70,7 +71,7 @@
gridSize: 80,
maxZoom: 14,
renderMarker(ctx) {
- let { marker, data } = ctx;
+ const { marker, data } = ctx;
if (Array.isArray(data) && data[0]) {
const { title, orientation } = data[0];
const content = ``;
@@ -89,20 +90,41 @@
map.setCenter(lnglat);
});
}
+ },
+ renderClusterMarker(ctx) {
+ const { clusterData, marker, count } = ctx;
+ const content = `
`;
+ marker.setContent(content);
+ const title = count == 1 ? clusterData[0].title : `上级医检医院数量:${count}`;
+ marker.setLabel({
+ direction: 'bottom',
+ //设置文本标注偏移量
+ offset: new AMap.Pixel(-4, 0),
+ //设置文本标注内容
+ content: `