Commit bb2439be authored by 华国豪's avatar 华国豪 🙄

1

parent 973ef678
......@@ -60,12 +60,12 @@ export default {
//实例化点
const point = new BMap.Point(item.Lng, item.Lat)
//自定义点的样式
// type 0 激活 绿色 20191125015057879
// 1 未拜访 紫色 20191125015102111
// 2 未激活 红色 20191125015100234
// type 0 激活 绿色 20191125022113414
// 1 未拜访 紫色 20191125022118834
// 2 未激活 蓝色 20191125022116319
const icon = new BMap.Icon(
item.type === 0 ? 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125015057879.png' : item.type === 1 ? 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125015102111.png' : 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125015100234.png',
new BMap.Size(30, 30)
item.type === 0 ? 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125022113414.png' : item.type === 1 ? 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125022118834.png' : 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125022116319.png',
new BMap.Size(34, 34)
);
//生成点标注
const marker = new BMap.Marker(point, { icon: icon });
......@@ -80,60 +80,60 @@ export default {
map.addOverlay(marker);
})
// //2种聚合的实现
const size = new BMap.Size( 30, 30 )
const size = new BMap.Size( 34, 34 )
var markerClusterer1 = new window.BMapLib.MarkerClusterer(map, {
markers: markerClusterers[1],
styles: [{
url:'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125015102111.png',
url:'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125022118834.png',
size: size,
textSize: 18,
textColor: 'white',
}, {
url: 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125015102111.png',
url: 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125022118834.png',
size: size,
textSize: 18,
textSize: 16,
textColor: 'white',
}, {
url: 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125015102111.png',
url: 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125022118834.png',
size: size,
textSize: 18,
textSize: 14,
textColor: 'white',
}]
})
var markerClusterer2 = new window.BMapLib.MarkerClusterer(map, {
markers: markerClusterers[2],
styles: [{
url:'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125015100234.png',
url:'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125022116319.png',
size: size,
textSize: 18,
textColor: 'white',
}, {
url: 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125015100234.png',
url: 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125022116319.png',
size: size,
textSize: 18,
textSize: 16,
textColor: 'white',
}, {
url: 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125015100234.png',
url: 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125022116319.png',
size: size,
textSize: 18,
textSize: 14,
textColor: 'white',
}]
})
var markerClusterer4 = new window.BMapLib.MarkerClusterer(map, { markers: markerClusterers[0],
styles: [{
url:'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125015057879.png',
url:'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125022113414.png',
size: size,
textSize: 18,
textColor: 'white',
}, {
url: 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125015057879.png',
url: 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125022113414.png',
size: size,
textSize: 18,
textSize: 16,
textColor: 'white',
}, {
url: 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125015057879.png',
url: 'http://imgfile.oytour.com/New/Upload/Cloud/2019-11/20191125022113414.png',
size: size,
textSize: 18,
textSize: 14,
textColor: 'white',
}] })
this.map = map
......
......@@ -258,14 +258,14 @@
width: 6px;
height: 6px;
display:inline-block;
background-color: #d81e06;
background-color: #1eb3ff;
margin-left: 10px;
}
.color-type span.b{
background-color: #1296db;
background-color: #5fffa3;
}
.color-type span.y{
background-color: #f4ea2a;
background-color: #fdaefd;
}
.color-type>div{
display: flex;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment