|
@ -129,8 +129,25 @@ export default { |
|
|
// Vue.prototype.map2d = this.$refs.gisMap2d; |
|
|
// Vue.prototype.map2d = this.$refs.gisMap2d; |
|
|
Vue.prototype.mapIns = this.$refs.gisMap2d; |
|
|
Vue.prototype.mapIns = this.$refs.gisMap2d; |
|
|
this.isGisCompleted = true; |
|
|
this.isGisCompleted = true; |
|
|
|
|
|
|
|
|
|
|
|
this.$root.$on('refresh-gismap', this.refreshLayer); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
refreshLayer(layers){ |
|
|
|
|
|
console.log(layers,'更新图标') |
|
|
|
|
|
this.$refs.gisMap2d.addPointByArr( |
|
|
|
|
|
{pointList:[]}, // 点位数据数组(按以下规范组装) |
|
|
|
|
|
'jhlayers', // 当前添加的数据 唯一标识(删除该图层时也会用到)//./事件专题/交通事故.svg |
|
|
|
|
|
true // 当前新加图层是否启用聚合效果 |
|
|
|
|
|
); |
|
|
|
|
|
this.$refs.gisMap2d.removeLayerByName('jhlayers'); |
|
|
|
|
|
this.$refs.gisMap2d.addPointByArr( |
|
|
|
|
|
layers, |
|
|
|
|
|
"jhlayers", |
|
|
|
|
|
true |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
debug(){ |
|
|
debug(){ |
|
|
this.$refs.Thumbnail.debug() |
|
|
this.$refs.Thumbnail.debug() |
|
|
}, |
|
|
}, |
|
@ -157,15 +174,15 @@ export default { |
|
|
this.$refs.gisMap2d.addPointByArr( |
|
|
this.$refs.gisMap2d.addPointByArr( |
|
|
// this.pointsObj, |
|
|
// this.pointsObj, |
|
|
pointsObj_new, |
|
|
pointsObj_new, |
|
|
"customLayer111", |
|
|
"jhlayers", |
|
|
true |
|
|
true |
|
|
); |
|
|
); |
|
|
}, |
|
|
}, |
|
|
ccccc() { |
|
|
ccccc() { |
|
|
this.$refs.gisMap2d.removeLayerByName("customLayer111"); |
|
|
this.$refs.gisMap2d.removeLayerByName("jhlayers"); |
|
|
}, |
|
|
}, |
|
|
ddddd() { |
|
|
ddddd() { |
|
|
this.$refs.gisMap2d.pileIsShow("customLayer111", this.isShow); |
|
|
this.$refs.gisMap2d.pileIsShow("jhlayers", this.isShow); |
|
|
// this.$refs.gisMap2d.pileIsShow("customLayer222", this.isShow); |
|
|
// this.$refs.gisMap2d.pileIsShow("customLayer222", this.isShow); |
|
|
this.isShow = !this.isShow; |
|
|
this.isShow = !this.isShow; |
|
|
}, |
|
|
}, |
|
|