| | |
| | | that.mapRemoveLayer(params.layerName, params.type) |
| | | }) |
| | | |
| | | this.$EventBus.$on('mapRemovePolygonLayer', (params) => { |
| | | that.mapRemovePolygonLayer(params.layerName, params.polygonName,params.type) |
| | | }) |
| | | |
| | | this.$EventBus.$on('mapClearLayer', (params) => { |
| | | that.mapClearLayer(params.layerName, params.type) |
| | | }) |
| | |
| | | }, |
| | | |
| | | /** |
| | | * 删除图层指定面 |
| | | * @param {*} layerName 图层名称 |
| | | * @param {*} polygonName 面名称 |
| | | * @param {*} type 图层类型 |
| | | */ |
| | | mapRemovePolygonLayer (layerName,polygonName, type) { |
| | | if (type == 'VectorLayer' || type == 'ClusterLayer' || type == 'HeatLayer') { |
| | | if (layersObjcect[layerName] && layersObjcect[layerName] != null&&polygonObj[polygonName]&&polygonObj[polygonName]!=null) { |
| | | layersObjcect[layerName].removeOverlay(polygonObj[polygonName]) |
| | | } |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 清空图层 |
| | | * @param {*} layerName 图层名称 |
| | | * @param {*} type 图层类型 |