| | |
| | | <!-- 全屏控制按钮 --> |
| | | <div class="screen-full-btn"> |
| | | <el-tooltip v-if="isFullscreen" content="缩放" placement="bottom" effect="dark"> |
| | | <i class="fa fa-compress" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i> |
| | | <i |
| | | class="fa fa-compress" |
| | | style="vertical-align: middle; cursor: pointer" |
| | | @click="fullscreenchange" |
| | | ></i> |
| | | </el-tooltip> |
| | | <el-tooltip v-if="!isFullscreen" content="全屏" placement="bottom" effect="dark"> |
| | | <i class="fa fa-expand" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i> |
| | | <i |
| | | class="fa fa-expand" |
| | | style="vertical-align: middle; cursor: pointer" |
| | | @click="fullscreenchange" |
| | | ></i> |
| | | </el-tooltip> |
| | | </div> |
| | | </div> |
| | |
| | | this.$EventBus.$on('layerPointAdd', (params) => { |
| | | // eslint-disable-next-line no-unused-vars |
| | | // console.log(params.incident) |
| | | that.layerPointAdd(params.layerName, params.type, params.params, params.distanceDisplayCondition, params.incident) |
| | | that.layerPointAdd(params.layerName, params.type, params.layerType, params.params, params.distanceDisplayCondition, params.incident) |
| | | }) |
| | | |
| | | this.$EventBus.$on('layerPolygonAdd', (params) => { |
| | |
| | | layersObjcect[layerName] = new global.DC.VectorLayer(layerName) |
| | | |
| | | layersObjcect[layerName].addTo(global.viewer) |
| | | } else if (type == 'ClusterLayer') { |
| | | if (!layersObjcect[layerName]) layersObjcect[layerName] = null |
| | | |
| | | layersObjcect[layerName] = new global.DC.ClusterLayer(layerName) |
| | | |
| | | layersObjcect[layerName].addTo(global.viewer) |
| | | } |
| | | }, |
| | | |
| | |
| | | * @param {*} type 图层类型 |
| | | */ |
| | | mapClearLayer (layerName, type) { |
| | | if (type == 'VectorLayer') { |
| | | if (type == 'VectorLayer' || type == 'ClusterLayer') { |
| | | if (layersObjcect[layerName] && layersObjcect[layerName] != null) |
| | | layersObjcect[layerName].clear() |
| | | } |
| | |
| | | * @param {*} params 添加的点位参数(内容、详情) |
| | | * @param {*} incident 添加的点位事件 |
| | | */ |
| | | layerPointAdd (layerName, type, params, distanceDisplayCondition = { |
| | | layerPointAdd (layerName, type, layerType = 'VectorLayer', params, distanceDisplayCondition = { |
| | | near: 0, //最近距离 |
| | | far: Number.MAX_VALUE //最远距离 |
| | | }, incident = (e) => { }) { |
| | | if (!layersObjcect[layerName] || layersObjcect[layerName] == null) { |
| | | this.mapAddLayer(layerName, 'VectorLayer') |
| | | this.mapAddLayer(layerName, layerType) |
| | | } |
| | | |
| | | let pointElement |