Esri / application-boilerplate-3x-js

Starter application that simplifies the process of building templates for the ArcGIS.com template gallery.
https://developers.arcgis.com/javascript/
Apache License 2.0
90 stars 68 forks source link

Added fetch of application item's data resource #83

Closed MikeTschudi closed 7 years ago

MikeTschudi commented 7 years ago

Merged data-resource fetch from 3DScene template with existing boilerplate queryApplication

driskull commented 7 years ago

hey @MikeTschudi what else do we get from fetchData()? Do we need to make another network call?

MikeTschudi commented 7 years ago

load() gets the http://www.arcgis.com/sharing/content/items/<id> main part of an item, while fetchData() gets the http://www.arcgis.com/sharing/content/items/<id>/data data resource part where all of the application configuration values reside. The PortalItem doc implies that load() gets all resources, but it doesn't. It would be better if load() had an option to return both pieces to avoid the second network call.

driskull commented 7 years ago

@kellyhutchins FYI. I guess it wasn't getting all the app values before?

kellyhutchins commented 7 years ago

@driskull I can look but it must be otherwise it wouldn't be possible to configure and save the config changes for the existing 3d templates.

driskull commented 7 years ago

yeah, lets double check. I thought it was working. We can always revert this if needed.

kellyhutchins commented 7 years ago

We have the fetchData portion in the 3D template source code so looks like we added this logic to the 3d template source but missed updating the boilerplate.