|
@ -107,7 +107,7 @@ export default { |
|
|
mapBoxHeight: '100vh', |
|
|
mapBoxHeight: '100vh', |
|
|
mapZoom: '7.5', // 默认值'7.5' String类型 |
|
|
mapZoom: '7.5', // 默认值'7.5' String类型 |
|
|
mapCenter: lnglat, //默认值[118.75, 36.46] Array类型 |
|
|
mapCenter: lnglat, //默认值[118.75, 36.46] Array类型 |
|
|
|
|
|
ttt:null |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
provide() { |
|
|
provide() { |
|
@ -135,15 +135,17 @@ export default { |
|
|
methods: { |
|
|
methods: { |
|
|
refreshLayer(layers){ |
|
|
refreshLayer(layers){ |
|
|
console.log(layers,'更新图标') |
|
|
console.log(layers,'更新图标') |
|
|
|
|
|
//this.$refs.gisMap2d.addPointByArr( |
|
|
|
|
|
// {pointList:[]}, // 点位数据数组(按以下规范组装) |
|
|
|
|
|
// 'jhlayers', // 当前添加的数据 唯一标识(删除该图层时也会用到)//./事件专题/交通事故.svg |
|
|
|
|
|
// true // 当前新加图层是否启用聚合效果 |
|
|
|
|
|
//); |
|
|
|
|
|
if(layers){ |
|
|
|
|
|
this.ttt=layers; |
|
|
|
|
|
} |
|
|
this.$refs.gisMap2d.addPointByArr( |
|
|
this.$refs.gisMap2d.addPointByArr( |
|
|
{pointList:[]}, // 点位数据数组(按以下规范组装) |
|
|
pointsObj_new,//JSON.parse(JSON.stringify(layers)), |
|
|
'jhlayers', // 当前添加的数据 唯一标识(删除该图层时也会用到)//./事件专题/交通事故.svg |
|
|
"jhlayers1111", |
|
|
true // 当前新加图层是否启用聚合效果 |
|
|
|
|
|
); |
|
|
|
|
|
this.$refs.gisMap2d.removeLayerByName('jhlayers'); |
|
|
|
|
|
this.$refs.gisMap2d.addPointByArr( |
|
|
|
|
|
layers, |
|
|
|
|
|
"jhlayers", |
|
|
|
|
|
true |
|
|
true |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
@ -171,18 +173,19 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
bbbbb() { |
|
|
bbbbb() { |
|
|
|
|
|
console.log(this.ttt) |
|
|
this.$refs.gisMap2d.addPointByArr( |
|
|
this.$refs.gisMap2d.addPointByArr( |
|
|
// this.pointsObj, |
|
|
// this.pointsObj, |
|
|
pointsObj_new, |
|
|
pointsObj_new, |
|
|
"jhlayers", |
|
|
"jhlayers1111", |
|
|
true |
|
|
true |
|
|
); |
|
|
); |
|
|
}, |
|
|
}, |
|
|
ccccc() { |
|
|
ccccc() { |
|
|
this.$refs.gisMap2d.removeLayerByName("jhlayers"); |
|
|
this.$refs.gisMap2d.removeLayerByName("jhlayers1111"); |
|
|
}, |
|
|
}, |
|
|
ddddd() { |
|
|
ddddd() { |
|
|
this.$refs.gisMap2d.pileIsShow("jhlayers", this.isShow); |
|
|
this.$refs.gisMap2d.pileIsShow("jhlayers1111", this.isShow); |
|
|
// this.$refs.gisMap2d.pileIsShow("customLayer222", this.isShow); |
|
|
// this.$refs.gisMap2d.pileIsShow("customLayer222", this.isShow); |
|
|
this.isShow = !this.isShow; |
|
|
this.isShow = !this.isShow; |
|
|
}, |
|
|
}, |
|
@ -376,6 +379,7 @@ export default { |
|
|
left: 5px; |
|
|
left: 5px; |
|
|
} |
|
|
} |
|
|
.btnItem { |
|
|
.btnItem { |
|
|
|
|
|
user-select: none; |
|
|
border: 1px #fff solid; |
|
|
border: 1px #fff solid; |
|
|
padding: 3px; |
|
|
padding: 3px; |
|
|
border-radius: 3px; |
|
|
border-radius: 3px; |
|
|