// 飞线点
const flyDian = () => {
const lineDataSet = new mapv.DataSet(lineData)
const lineOptions = {
strokeStyle: 'rgba(255, 250, 50, 0.8)',
shadowColor: 'rgba(255, 250, 50, 1)',
shadowBlur: 20,
lineWidth: 2,
zIndex: 100,
draw: 'simple'
}
new L.supermap.MapVLayer(lineDataSet, lineOptions).addTo(pageData.map)
const pointOptions = {
fillStyle: 'rgba(254,175,3,0.7)',
shadowColor: 'rgba(55, 50, 250, 0.5)',
shadowBlur: 10,
size: 5,
zIndex: 10,
draw: 'simple'
}
const pointDataSet = new mapv.DataSet(pointData)
// 点
new L.supermap.MapVLayer(pointDataSet, pointOptions).addTo(pageData.map)
const timeDataSet = new mapv.DataSet(timeData)
const timeOptions = {
fillStyle: 'rgba(255, 250, 250, 0.5)',
zIndex: 200,
size: 2.5,
animation: {
type: 'time',
stepsRange: {
start: 0,
end: 50
},
trails: 10,
duration: 2
},
draw: 'simple'
}
// 动画效果
new L.supermap.MapVLayer(timeDataSet, timeOptions).addTo(pageData.map)
}
我是使用这种方式添加的飞线点位等,我下钻的时候截取了当前省份,当前省份外的地图不显示,但是这个飞线和点位一直在,如何给他移除或者隐藏