| | |
| | | layer: layer |
| | | }) |
| | | const result = await mapApi.getSourcesPoll() |
| | | console.log(result) |
| | | // console.log(result) |
| | | const resultData = result.Result.DataInfo || [] |
| | | console.log(resultData) |
| | | // 循环遍历数据 根据进行marker 的创建 |
| | | for (let i = 0; i < resultData.length; i++) { |
| | | const polygon = L.polygon(resultData, { |
| | | // totransferData: resultData[i], |
| | | color: 'red' |
| | | }) |
| | | layer.addLayer(polygon) |
| | | } |
| | | const polygon = L.polygon(resultData, { color: 'yellow' }) |
| | | polygon.addTo(layer) |
| | | } |
| | | this.bindTooltip = (layer) => { |
| | | return 'layer' |
| | | } |
| | | this.click = () => { |
| | | window.$layer.open({ |
| | | content: { |
| | | content: 'Popup', // 组件 |
| | | data: { // 传递的参数 |
| | | datas: 'popupDatas' |
| | | } |
| | | }, |
| | | title: '' |
| | | }) |
| | | } |
| | | } |