| | |
| | | "IsSuccess": 1, |
| | | "ErrorMsg": "", |
| | | "DataInfo": [ |
| | | { |
| | | "StoragePlaceId": 0, |
| | | "Name": "巴陵石化 取水单元干泥暂存库", |
| | | "StorageQtyMax": 0, |
| | | "Longitude": 113.38361, |
| | | "Latitude": 29.9008, |
| | | "SortNum": 0, |
| | | "DesignFloorArea": 0, |
| | | "VideoCoding": null, |
| | | "VideoURL": null, |
| | | "DaysAlarm": 0, |
| | | "MarginAlarm": 0 |
| | | }, |
| | | { |
| | | "StoragePlaceId": 1, |
| | | "Name": "巴陵石化 吉家湖灰塘", |
| | | "StorageQtyMax": 0, |
| | | "Longitude": 113.14089, |
| | | "Latitude": 29.4181, |
| | | "SortNum": 0, |
| | | "DesignFloorArea": 0, |
| | | "VideoCoding": null, |
| | | "VideoURL": null, |
| | | "DaysAlarm": 0, |
| | | "MarginAlarm": 0 |
| | | }, |
| | | { |
| | | "StoragePlaceId": 2, |
| | | "Name": "长岭炼化 八字门垃圾填埋场", |
| | | "StorageQtyMax": 0, |
| | | "Longitude": 113.3916666667, |
| | | "Latitude": 29.6394444444, |
| | | "SortNum": 0, |
| | | "DesignFloorArea": 0, |
| | | "VideoCoding": null, |
| | | "VideoURL": null, |
| | | "DaysAlarm": 0, |
| | | "MarginAlarm": 0 |
| | | }, |
| | | { |
| | | "StoragePlaceId": 3, |
| | | "Name": "中韩石化 灰渣场", |
| | | "StorageQtyMax": 0, |
| | | "Longitude": 114.5192083333, |
| | | "Latitude": 30.6201666667, |
| | | "SortNum": 0, |
| | | "DesignFloorArea": 0, |
| | | "VideoCoding": null, |
| | | "VideoURL": null, |
| | | "DaysAlarm": 0, |
| | | "MarginAlarm": 0 |
| | | }, |
| | | { |
| | | "StoragePlaceId": 4, |
| | | "Name": "安庆石化 山口废渣填埋场", |
| | | "StorageQtyMax": 0, |
| | | "Longitude": 116.960599, |
| | | "Latitude": 30.541509, |
| | | "SortNum": 0, |
| | | "DesignFloorArea": 0, |
| | | "VideoCoding": null, |
| | | "VideoURL": null, |
| | | "DaysAlarm": 0, |
| | | "MarginAlarm": 0 |
| | | }, |
| | | { |
| | | "StoragePlaceId": 5, |
| | | "Name": "安庆石化 热电陈家冲灰场", |
| | | "StorageQtyMax": 0, |
| | | "Longitude": 116.986949, |
| | | "Latitude": 30.534486, |
| | | "SortNum": 0, |
| | | "DesignFloorArea": 0, |
| | | "VideoCoding": null, |
| | | "VideoURL": null, |
| | | "DaysAlarm": 0, |
| | | "MarginAlarm": 0 |
| | | }, |
| | | { |
| | | "StoragePlaceId": 6, |
| | | "Name": "高桥石化 海滨码头附近滩涂", |
| | | "StorageQtyMax": 0, |
| | | "Longitude": 121.55, |
| | | "Latitude": 31.63, |
| | | "SortNum": 0, |
| | | "DesignFloorArea": 0, |
| | | "VideoCoding": null, |
| | | "VideoURL": null, |
| | | "DaysAlarm": 0, |
| | | "MarginAlarm": 0 |
| | | }, |
| | | { |
| | | "StoragePlaceId": 7, |
| | | "Name": "川维化工 生化污泥料仓", |
| | | "StorageQtyMax": 0, |
| | | "Longitude": 107.02342004, |
| | | "Latitude": 29.79235333, |
| | | "SortNum": 0, |
| | | "DesignFloorArea": 0, |
| | | "VideoCoding": null, |
| | | "VideoURL": null, |
| | | "DaysAlarm": 0, |
| | | "MarginAlarm": 0 |
| | | }, |
| | | { |
| | | "StoragePlaceId": 8, |
| | | "Name": "川维化工 排泥水泥饼料仓", |
| | | "StorageQtyMax": 0, |
| | | "Longitude": 107.02315181, |
| | | "Latitude": 29.78832166, |
| | | "SortNum": 0, |
| | | "DesignFloorArea": 0, |
| | | "VideoCoding": null, |
| | | "VideoURL": null, |
| | | "DaysAlarm": 0, |
| | | "MarginAlarm": 0 |
| | | } |
| | | [ |
| | | 116.38927817344666, |
| | | 39.90751504898071 |
| | | ], |
| | | [ |
| | | 116.38689637184143, |
| | | 39.9088454246521 |
| | | ], |
| | | [ |
| | | 116.39344096183777, |
| | | 39.90931749343872 |
| | | ], |
| | | [ |
| | | 116.39116644859314, |
| | | 39.90489721298218 |
| | | ] |
| | | ] |
| | | } |
| | | } |
| | |
| | | export const getCrossSection = $HOSTANALYSE + '/getCrossSection' |
| | | |
| | | // 污染源 |
| | | export const getSourcesPoll = 'http://localhost:8081/static/SourcesPoll.json' |
| | | export const getSourcesPoll = 'http://localhost:8080/static/SourcesPoll.json' |
| | |
| | | * 污染源 |
| | | * */ |
| | | |
| | | // 使用封装方法 |
| | | // 请求接口数据 |
| | | // import { getSourcesPoll } from '../../../api/request' |
| | | |
| | | const mapApi = require('../../../api/mapApi').default |
| | | // 使用封装方法 |
| | | const AnimalService = require('../service/AnimalService').default |
| | | |
| | | module.exports = function () { |
| | |
| | | L: L, |
| | | layer: layer |
| | | }) |
| | | // getSourcesPoll().then(res => { |
| | | // console.log(res) |
| | | // }) |
| | | const result = await mapApi.getSourcesPoll() |
| | | 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) |
| | | } |
| | | } |
| | | } |