| | |
| | | /** |
| | | * 固废 |
| | | */ |
| | | |
| | | // 区分不同类型 使用不同img |
| | | const defaultImg = '/assets/images/map/solidwaste/voc.png' |
| | | const setting = '/assets/images/map/solidwaste/gf_green.png' |
| | |
| | | return layer.options.test.Name |
| | | } |
| | | |
| | | this.clickListener = async (e) => { |
| | | this.clickListener = (e) => { |
| | | // 点击marker的pulse()光波 |
| | | this.animalService.pulseEffect(e.latlng) |
| | | /* flyTo()弹出框平移事件 */ |
| | | // this.setPanTo(e.latlng, 200) |
| | | console.log(e) |
| | | /* 点击数据的接口请求 */ |
| | | this.requestSolidWasteData(e).then(e) |
| | | } |
| | | |
| | | // 根据点击不同数据 进行接口的数据请求 |
| | | this.requestSolidWasteData = async (e) => { |
| | | const dataValue = { |
| | | StoragePlaceId: e.layer.options.test.StoragePlaceId |
| | | } |
| | |
| | | instance.setData(result.Result.DataInfo, 'gufei') |
| | | } |
| | | |
| | | // panTo |
| | | this.setPanTo = (pos, value) => { |
| | | var position = pos |
| | | position = this.layer.latLngToLayerPoint(position) |
| | | position.y += value |
| | | position = this.layer.layerPointToLatLng(position) |
| | | this.layer.flyTo(position) |
| | | } |
| | | // flayTo() |
| | | // this.setPanTo = (pos, value) => { |
| | | // var position = pos |
| | | // position = this.map.latLngToLayerPoint(position) |
| | | // position.y += value |
| | | // position = this.map.layerPointToLatLng(position) |
| | | // this.map.flyTo(position) |
| | | // } |
| | | |
| | | // 不同类型图片封装 |
| | | this.differentTypes = (judgeValue) => { |