POST
|
Hi, Kelly. I'm having trouble with how to structure the syntax to query the items and populate the carousel with the map thumbnails. Can you help me along? Am I missing something? <script type = "text/javascript"> require([ "esri/core/urlUtils", "esri/portal/Portal", "esri/portal/PortalGroup", "esri/identity/OAuthInfo", "esri/identity/IdentityManager", "esri/portal/PortalQueryParams" ], function (urlUtils, Portal, PortalGroup, OAuthInfo, esriId, PortalQueryParams) { urlUtils.addProxyRule({ urlPrefix: "https://www.arcgis.com", proxyUrl: "https://localhost/dotnet/proxy.ashx" }); displayItems(); function displayItems() { var portalGroup = new PortalGroup({ id: "3Ab1689d3d9dab474caa8a9cb4785a244f", owner: "Rocket350", portalUrl: "https://rocket350.maps.arcgis.com" }); // Query the group items from portalGroup above portalGroup.queryItems().then(populateCarousel); } function populateCarousel(items) { //var htmlFragment = ""; index = 0; items.results.forEach(function (item) { index += 1; if (item.type == "Web Map") { console.log(item.type); console.log(item.thumbnailUrl); //Sconsole.log(item.thumbnailUrl); // htmlFragment += // '<div class="esri-item-container">' + // (item.thumbnailUrl // ? '<div class="esri-image" style="background-image:url(' + // item.thumbnailUrl + // ');"></div>' // : '<div class="esri-image esri-null-image">Thumbnail not available</div>') + // (item.title // ? '<div class="esri-title">' + (item.title || "") + "</div>" // : '<div class="esri-title esri-null-title">Title not available</div>') + // "</div>"; $('<div class="carousel-item"><img src="'+ item.thumbnailUrl+'" width="50%"></div>').appendTo('.carousel-inner') console.log(index); } else { console.log(item.type); } }); $('.carousel-item').first().addClass('active'); $('.carousel-indicators > li').first().addClass('active'); $('#mapCarousel').carousel(); } }); </script>
... View more
12-31-2019
10:08 AM
|
0
|
0
|
338
|
POST
|
Okay. Thank you. I will give the documentation a look.
... View more
12-23-2019
02:12 PM
|
1
|
0
|
338
|
POST
|
Hello. I had asked a question a couple of weeks ago about retrieving map items from a group in AGOL. The example I was given worked, but I need to get public times within a group. How would I go about doing this? I know the group Id, but I'm not sure how to query said group to get the items. Thanks.
... View more
12-23-2019
12:43 PM
|
1
|
3
|
531
|
POST
|
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
... View more
12-06-2019
12:56 PM
|
1
|
10
|
1250
|
Title | Kudos | Posted |
---|---|---|
1 | 12-23-2019 02:12 PM | |
1 | 12-23-2019 12:43 PM | |
1 | 12-06-2019 12:56 PM | |
1 | 12-11-2019 07:29 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|