I'm new to AGOL and the JS ESRI API. As the question states, I'm looking for a way to retrieve the maps from a group with thumbnails and then populate a Boostrap carousel with the thumbnails from the maps. How do i access the group from the JS API? Do I need to create an App on AGOL with an Id and secret to access the group? Any help pointing me in the right direction would be greatly appreciated. Thanks. group items basic authentication carousel novice
The following sample shows how to get content from an ArcGIS Online group and display the thumbnail and title info.
Thank you for reply! This really helped.
Hi Skyler,
Did you succeed in getting the content from a Group? Do you have any sample code to get me going.
Appreciated
Thanks
Hi Kelly,
Your sample gives me only the maps from the "My Content" tab in ArcGIS online. I want to get the maps from a group in My Groups, I am assigned to the group but I can't figure out how I can get the results from a group.
You can use the queryGroups method on the Portal class to find the group you want to display and then use the PortalGroup.queryItems method to access the group content.
Get the group using queryGroups:
Portal | ArcGIS API for JavaScript 4.14
Get the items from the group using queryItems:
Hi Kelly, any samples?
Appreciated.
There isn't a sample in the sdk but there is a demo app in a Developer summit presentation that uses queryGroups here: DevSummit-presentations/template.js at 0571a5195ea33f0216b05150ff305c95a50ffa03 · hgonzago/DevSummit...
That is from 2014, I would like to use the latest Javascript API version....
Sorry I don't have a more recent sample but the idea is the same. You'll query for the group and then use the group to query for its content.