ReportPlayer with an area containing a large number of points

524
2
08-02-2018 05:13 PM
by Anonymous User
Not applicable

So, I'm working with the ReportPlayer (using Chrome) and running it with analysisAreas that contain feature geometry. When I have a large detailed area with lots of points (or many areas that, in total, contain a lot of points, the report player is unable to load the generated report.

I've tracked it down to the report player attempting to generalize the features (it only does so when a threshold is reached (e.g. many points)) and attempting to create a new Worker process. The console logs the following:

Failed to construct 'Worker': Script at 'https://js.arcgis.com/3.25/esri/dijit/geoenrichment/utils/GeometryUtil_worker.js' cannot be accessed from origin 'http://localhost'

Now, a little searching tells me that Chrome will throw that error when running the script locally (i.e. with the file protocol) but that is not the case here. 

Just wondering if any ESRI folks have seen this or been able to successfully run a report on a large, very detailed polygon?

For reference, the Worker is being instantiated within the generalizeGeometry function of https://js.arcgis.com/3.25/esri/dijit/geoenrichment/utils/GeometryUtil.js

Thanks,

Jeff

0 Kudos
2 Replies
KyleWatson
Esri Contributor

Hi Jeff - we are reviewing this and should have some information for you shortly - thx!

0 Kudos
GarryBurgess
Esri Contributor

Jeff,

Unfortunately, you have found a problem with the report player in the JS API.  When a large (complex) geometry is sent to the player to create an infographic, we use a a worker to first generalize the polygon.  There is a cross domain policy issue that is causing the error you are receiving.  We are working on a fix for this that will be included in the next update of the JS API.  We don't have a specific time-frame yet for this fix, but it will likely be included in the next update in early-fall.

As a work-around, you can simplify geometries using the GeometryService before passing it to the player.  Some doc here: GeometryService | API Reference | ArcGIS API for JavaScript 3.25 

Thanks for bringing this to our attention.

- Business Analyst dev team

0 Kudos