| | |
| | | |
| | | export const computerCapacity = (data, type) => { |
| | | if (type == 'region') { |
| | | console.log('computerCapacity', data) |
| | | const pointArr = data.reduce((pre, cur) => { |
| | | cur.position && JSON.parse(cur.position).coordinates[0][0].forEach(item => { |
| | | console.log(item, 959) |
| | |
| | | console.log(scope, scaledPoly, 5555) |
| | | } else { |
| | | let pointArr = [] |
| | | |
| | | console.log('data', data) |
| | | data.forEach(item => { |
| | | if (item.longitude && item.latitude) { |
| | | pointArr.push(turf.point([item.longitude, item.latitude])) |
| | |
| | | |
| | | console.log(scope, 5555) |
| | | |
| | | const poly = turf.polygon([[[0, 29], [3.5, 29], [2.5, 32], [0, 29]]]) |
| | | // const poly = turf.polygon([[[0, 29], [3.5, 29], [2.5, 32], [0, 29]]]) |
| | | |
| | | global.viewer.flyToBounds(scope, |
| | | { heading: 0, pitch: -45, roll: 0 }, |