| | |
| | | const images1 = { |
| | | fileListOne: [], |
| | | fileListTwo: [], |
| | | fileListThree: [], |
| | | o3Map: [], |
| | | o3Sence: [], |
| | | pm10Map: [], |
| | |
| | | // images1.push({ [src]: base64 }) |
| | | if (j === 0) { |
| | | images1.fileListOne.push({ src: base64 }) |
| | | // console.log(images1.fileListOne,'images1.fileListOne') |
| | | } else if (j === 1) { |
| | | images1.fileListTwo.push({ src: base64 }) |
| | | } else if (j === 2) { |
| | |
| | | } |
| | | }) |
| | | p.then(res => { |
| | | opts.getImage = function(image) { |
| | | opts.getImage = function (image) { |
| | | return base64DataURLToArrayBuffer(image) |
| | | } |
| | | opts.getSize = function() { |
| | | opts.getSize = function () { |
| | | return [480, 300] |
| | | } |
| | | |
| | |
| | | var image = new Image() |
| | | image.crossOrigin = '' |
| | | image.src = url |
| | | image.onload = function() { |
| | | image.onload = function () { |
| | | base64Img = imageToBase64(image) |
| | | cb && cb(base64Img) |
| | | } |