| | |
| | | layer: layer |
| | | }) |
| | | const res = await mapApi.getWasteWater() |
| | | // console.log(res) |
| | | const data = res.Result.DataInfo |
| | | // console.log(data) |
| | | const data = res.Result.DataInfo || {} |
| | | for (let i = 0; i < data.length; i++) { |
| | | // 经纬度 位置 |
| | | const positionX = data[i].Latitude |
| | |
| | | const dataValue = { |
| | | StoragePlaceId: e.layer.options.test.StoragePlaceId |
| | | } |
| | | const result = await mapApi.getWasteWater(dataValue) |
| | | const drawback = await mapApi.getWasteWaterMonitoring() |
| | | console.log(drawback) |
| | | const result = await mapApi.getWasteWaterMonitoringDetails(dataValue) |
| | | const PublicBounced = window.Vue.extend(publicBounced) |
| | | const instance = new PublicBounced() |
| | | instance.setData(result) |
| | | instance.setWaterData(e.layer.options.test, result.Result.DataInfo, drawback.Result.DataInfo, 'feishui') |
| | | console.log(e.layer.options.test) |
| | | instance.$mount() |
| | | document.body.appendChild(instance.$el) |
| | | this.setPanTo(e.latlng, 240) |
| | | } |
| | | |
| | | // 根据返回值的不同标记不同图片 |
| | |
| | | } |
| | | return testChange |
| | | } |
| | | this.setPanTo = (pos, value) => { |
| | | var position = pos |
| | | position = window.map.latLngToLayerPoint(position) |
| | | position.y += value |
| | | position = window.map.layerPointToLatLng(position) |
| | | window.map.flyTo(position) |
| | | } |
| | | } |