After I publish the model, I can get the correct results when I test it locally, but when I use ArcGIS for js, I get the following error when requesting layer results
ReferenceError: Cannot access 'F' before initialization
at Module.default (MapImageLayer.js:1:1)
at l.fetchResultMapImageLayer (JobInfo.js:5:2535)
This is the core source code, everything works fine until the fetchResultMapImageLayer() method is called.
geoprocessor.submitJob(GPurl, params).then(jobInfo => {
const jobid = jobInfo.jobId
console.log('ArcGIS Server job ID: ', jobid)
console.log(jobInfo)
const options = {
interval: 5000,
statusCallback: () => {
console.log('running...')
}
}
jobInfo.waitForJobCompletion(options).then((jobInfo2) => {
console.log(jobInfo2)
jobInfo2.fetchResultMapImageLayer(jobInfo2.jobId).then((layer) => {
// _this.map.add(layer)
console.log(layer)
_this.fullscreenLoading = false
}).catch(err => {
console.log(err)
_this.fullscreenLoading = false
})
})
Arcgis For JS: 4.23.6
Arcgis Server 10.2
That is odd, I can't repro. The sample does everything you are. Does this also happen with 4.24? I don't think there have been any changes there for a couple of releases.
Thank you for your reply. I later used esri-loader to load the module to solve this problem. The core I used is version 4.23, because higher than this version will cause when I use vuecli to start, webpack will prompt that the module cannot be loaded, lack of suitable loader