This commit is contained in:
zk
2023-12-22 16:57:16 +08:00
parent dd5a47e7fb
commit b9f2b3b521
15 changed files with 240 additions and 182 deletions
+22
View File
@@ -0,0 +1,22 @@
// 地图默认配置
export const defaultOption = {
center: [108.660704, 36.386058], //地图中心点
zoom: 6.5, //地图显示的缩放级别
mapStyle: 'darkblue', //地图样式
};
// 地图key
export const mapKey = '4bbcb216b889f2d612cbed05ae6979c8'
export const mapPlugin = ['AMap.ToolBar', 'AMap.Driving', 'AMap.GeoJSON', 'AMap.MarkerCluster', 'AMap.PlaceSearch'];
//根据数据量设置地图层级
export function getZoom(list = []) {
let len = list.length
// console.log('len', len)
if (len <= 5) {
return 7.5;
} else if (len <= 30) {
return 6.7;
} else {
return 7;
}
}