<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: 4.26 to 4.28 upgrade of Expand widget containing a BasemapGallery widget not rendering upon expand in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-26-to-4-28-upgrade-of-expand-widget-containing-a/m-p/1418957#M84509</link>
    <description>&lt;P&gt;I have the same problem. Did you solve it?&lt;/P&gt;</description>
    <pubDate>Fri, 03 May 2024 22:08:44 GMT</pubDate>
    <dc:creator>GerardoDuarte_Hodgson</dc:creator>
    <dc:date>2024-05-03T22:08:44Z</dc:date>
    <item>
      <title>4.26 to 4.28 upgrade of Expand widget containing a BasemapGallery widget not rendering upon expand</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-26-to-4-28-upgrade-of-expand-widget-containing-a/m-p/1342671#M82588</link>
      <description>&lt;P&gt;I am having trouble transitioning from v4.26 of the sdk to v4.28. My basemap gallery used to function properly, but now after upgrading it is not rendering within the expand content div. The following is a config file I use (Imported to javascript as an object: _config), and the code follows. Any help would be appreciated.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "id": "basemapgallery",
    "version": 4.20,
    "expanded": false,
    "visible": true,
    "defaultThumbnail": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/default.jpg",
    "basemaps": {
        "en": [
            {
                "id": "BASE_NSTDB_10k_Colour_WM84",
                "title": "Nova Scotia Colour Topographic",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/NSColour.png",
                "layers": [
                    {
                        "id": "BASE_NSTDB_10k_Colour",
                        "title": "1:10 000 Colour Topographic Map",
                        "url": "https://nsgiwa.novascotia.ca/arcgis/rest/services/BASE/BASE_NSTDB_10k_Colour_WM84/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
              },
              {
                "id": "BASE_NSTDB_10k_Grey_WithGeoNameLabels_WM84",
                "title": "Nova Scotia Grey Canvas",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/NSGrey.png",
                "layers": [
                    {
                        "id": "BASE_NSTDB_10k_Grey_WithGeoNameLabels",
                        "title": "1:10 000 Grey Base Map",
                        "url": "https://nsgiwa.novascotia.ca/arcgis/rest/services/BASE/BASE_NSTDB_10k_Grey_WithGeoNameLabels_WM84/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
              },
              {
                "id": "BASE_NSTDB_10k_Grey_WM84",
                "title": "Nova Scotia Grey Canvas with Roads",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/NSTopo.png",
                "layers": [
                    {
                        "id": "BASE_NSTDB_10k_Grey",
                        "title": "1:10 000 Grey Base Map",
                        "url": "https://nsgiwa.novascotia.ca/arcgis/rest/services/BASE/BASE_NSTDB_10k_Grey_WM84/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
              },
              {
                "id": "BASE_NSTDB_10k_Roads_WM84",
                "title": "Nova Scotia Roads",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/NSRoads.png",
                "layers": [
                    {
                        "id": "BASE_NSTDB_10k_Roads",
                        "title": "1:10 000 Base Roads",
                        "url": "https://nsgiwa.novascotia.ca/arcgis/rest/services/BASE/BASE_NSTDB_10k_Roads_WM84/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
              },
              {
                "id": "BASE_NSODB_10k_WM84",
                "title": "Nova Scotia Imagery",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/NSImagery.png",
                "layers": [
                    {
                        "id": "BASE_NSODB_10k",
                        "title": "1:10 000 Base Imagery",
                        "url": "https://nsgiwa.novascotia.ca/arcgis/rest/services/BASE/BASE_NSODB_10k_WM84/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
              },
            {
                "id": "World_Light_Gray",
                "title": "Light Gray Canvas",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/LightGreyCanvas.jpg",
                "layers": [
                    {
                        "id": "World_Light_Gray_Base",
                        "title": "Light Grey Base",
                        "opacity": 1,
                        "visibility": true,
                        "url": "https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer"
                    },
                    {
                        "id": "World_Light_Gray_Reference",
                        "title": "Light Grey Reference",
                        "isReference": true,
                        "opacity": 1,
                        "visibility": true,
                        "url": "https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
            },
            {
                "id": "World_Dark_Gray",
                "title": "Dark Grey Canvas",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/DarkGreyCanvas.png",
                "layers": [
                    {
                        "id": "World_Dark_Gray_Base",
                        "title": "Dark Grey Base",
                        "opacity": 1,
                        "visibility": true,
                        "url": "https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer"
                    },
                    {
                        "id": "World_Dark_Gray_Reference",
                        "title": "Dark Grey Reference",
                        "isReference": true,
                        "opacity": 1,
                        "visibility": true,
                        "url": "https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
            },
            {
                "id": "World_Imagery",
                "title": "World Imagery",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/WorldImagery.jpg",
                "layers": [
                    {
                        "id": "World_Imagery_2017",
                        "title": "World Imagery 2017",
                        "visibility": true,
                        "opacity": 1,
                        "url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
            },
            {
                "id": "World_Street_Map",
                "title": "World Roads",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/WorldStreets.jpg",
                "layers": [
                    {
                        "id": "World_Street_Map_8421",
                        "title": "World Street Map",
                        "opacity": 1,
                        "visibility": true,
                        "url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
            },
            {
                "id": "World_Topo_Map",
                "title": "World Topographic",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/WorldTopo.jpg",
                "layers": [
                    {
                        "id": "defaultBasemap",
                        "title": "World Topology Basemap",
                        "opacity": 1,
                        "visibility": true,
                        "url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
            }
            ],
        "fr": [
            {
                "id": "BASE_NSTDB_10k_Colour_WM84",
                "title": "Carte Topographique Couleur de la Nouvelle-Écosse",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/NSColour.png",
                "layers": [
                    {
                        "id": "BASE_NSTDB_10k_Colour",
                        "title": "Carte Topographique en Couleur 1:10 000",
                        "url": "https://nsgiwa.novascotia.ca/arcgis/rest/services/BASE/BASE_NSTDB_10k_Colour_WM84/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
              },
              {
                "id": "BASE_NSTDB_10k_Grey_WithGeoNameLabels_WM84",
                "title": "Toile Grise de la Nouvelle-Écosse",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/NSGrey.png",
                "layers": [
                    {
                        "id": "BASE_NSTDB_10k_Grey_WithGeoNameLabels",
                        "title": "Carte de Base Grise 1:10 000",
                        "url": "https://nsgiwa.novascotia.ca/arcgis/rest/services/BASE/BASE_NSTDB_10k_Grey_WithGeoNameLabels_WM84/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
              },
              {
                "id": "BASE_NSTDB_10k_Grey_WM84",
                "title": "Toile Grise de la Nouvelle-Écosse avec Routes",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/NSTopo.png",
                "layers": [
                    {
                        "id": "BASE_NSTDB_10k_Grey",
                        "title": "Carte de Base Grise 1:10 000",
                        "url": "https://nsgiwa.novascotia.ca/arcgis/rest/services/BASE/BASE_NSTDB_10k_Grey_WM84/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
              },
              {
                "id": "BASE_NSTDB_10k_Roads_WM84",
                "title": "Routes de la Nouvelle-Écosse",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/NSRoads.png",
                "layers": [
                    {
                        "id": "BASE_NSTDB_10k_Roads",
                        "title": "Routes de Base 1:10 000",
                        "url": "https://nsgiwa.novascotia.ca/arcgis/rest/services/BASE/BASE_NSTDB_10k_Roads_WM84/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
              },
              {
                "id": "BASE_NSODB_10k_WM84",
                "title": "Images de la Nouvelle-Écosse",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/NSImagery.png",
                "layers": [
                    {
                        "id": "BASE_NSODB_10k",
                        "title": "Imagerie de Base 1:10 000",
                        "url": "https://nsgiwa.novascotia.ca/arcgis/rest/services/BASE/BASE_NSODB_10k_WM84/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
              },
            {
                "id": "World_Light_Gray",
                "title": "Toile Gris Clair",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/LightGreyCanvas.jpg",
                "layers": [
                    {
                        "id": "World_Light_Gray_Base",
                        "title": "Base Gris Clair",
                        "opacity": 1,
                        "visibility": true,
                        "url": "https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer"
                    },
                    {
                        "id": "World_Light_Gray_Reference",
                        "title": "Référence Gris Clair",
                        "isReference": true,
                        "opacity": 1,
                        "visibility": true,
                        "url": "https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
            },
            {
                "id": "World_Dark_Gray",
                "title": "Toile Gris Foncé",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/DarkGreyCanvas.png",
                "layers": [
                    {
                        "id": "World_Dark_Gray_Base",
                        "title": "Base Gris Foncé",
                        "opacity": 1,
                        "visibility": true,
                        "url": "https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer"
                    },
                    {
                        "id": "World_Dark_Gray_Reference",
                        "title": "Référence Gris Foncé",
                        "isReference": true,
                        "opacity": 1,
                        "visibility": true,
                        "url": "https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
            },
            {
                "id": "World_Imagery",
                "title": "Imagerie Mondiale",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/WorldImagery.jpg",
                "layers": [
                    {
                        "id": "World_Imagery_2017",
                        "title": "Imagerie Mondiale 2017",
                        "visibility": true,
                        "opacity": 1,
                        "url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
            },
            {
                "id": "World_Street_Map",
                "title": "Routes Mondiale",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/WorldStreets.jpg",
                "layers": [
                    {
                        "id": "World_Street_Map_8421",
                        "title": "Carte des Rues du Monde",
                        "opacity": 1,
                        "visibility": true,
                        "url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
            },
            {
                "id": "World_Topo_Map",
                "title": "Topographie Mondiale",
                "thumbnailURL": "src/widgets/widgetbar/assets/widgets/basemapgallery/img/WorldTopo.jpg",
                "layers": [
                    {
                        "id": "defaultBasemap",
                        "title": "Carte de Base de la Topologie Mondiale",
                        "opacity": 1,
                        "visibility": true,
                        "url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"
                    }
                ],
                "spatialReference": {
                    "wkid": 102100
                }
            }
        ]
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;let basemaps = _config.basemaps as _Basemaps;
let basemapArray = basemaps[_lang] as Array&amp;lt;_Basemap&amp;gt;;

var _basemaps = new Collection&amp;lt;Basemap&amp;gt;();
basemapArray.map (baseMap =&amp;gt; {
    var _basemap: Basemap;
    var _title = baseMap.title? baseMap.title: baseMap.id? baseMap.id: "";

    var _spatialReference = new SpatialReference();
    if (baseMap.spatialReference) {
        _spatialReference = baseMap.spatialReference;
    }

    _basemap = new Basemap({
        id: baseMap.id,
        title: _title,
        thumbnailUrl: baseMap.thumbnailURL? baseMap.thumbnailURL : _default_thumbnail? _default_thumbnail: undefined,
        spatialReference: _spatialReference? _spatialReference: undefined
    });

    if (baseMap.layers &amp;amp;&amp;amp; baseMap.layers.length &amp;gt; 0) {
        var _layers = new Collection&amp;lt;MapImageLayer&amp;gt;();
        var _refLayers = new Collection&amp;lt;MapImageLayer&amp;gt;();

        baseMap.layers.map(layer =&amp;gt; {
            if (layer.url &amp;amp;&amp;amp; typeof layer.url === "string") {
                var lyr = getLayer(layer)
                if (lyr) {
                    if (layer.isReference &amp;amp;&amp;amp; layer.isReference === true) {
                        _refLayers.add(lyr);
                    } else {
                        _layers.add(lyr);
                    }
                }
            }
        });
    
        _basemap.baseLayers = _layers;
        _basemap.referenceLayers = _refLayers;
    };

    _basemaps.push(_basemap);
});

let _basemapGallery = new BasemapGallery({
    view: _mapView,
    label: _label,
    source: new LocalBasemapsSource({
        basemaps: _basemaps
    })
});


_basemapGallery_expand.id = widget.id;
_basemapGallery_expand.view = _mapView;
_basemapGallery_expand.visible = _visible;
_basemapGallery_expand.content = _basemapGallery;
_basemapGallery_expand.expanded = _expanded;
_basemapGallery_expand.group = _group;
_basemapGallery_expand.container = widget.id;
_basemapGallery_expand.collapseIcon = "chevron-up";

_mapView.when(() =&amp;gt; {
    _basemapGallery_expand.expandTooltip = `${_basemapGallery.label}`;
});

_basemapGallery_expand.when(() =&amp;gt; {
    _basemapGallery.source.basemaps.forEach(basemap =&amp;gt; {
        basemap.baseLayers.forEach(layer =&amp;gt; {
            var lyr = layer as MapImageLayer;
            console.log(`Layer URL (${lyr.id}): ${lyr.url}`);
        });
    });
    console.log("BasemapGallery widget rendered.");
    resolve(_basemapGallery_expand);
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 14:39:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-26-to-4-28-upgrade-of-expand-widget-containing-a/m-p/1342671#M82588</guid>
      <dc:creator>René_Ténière</dc:creator>
      <dc:date>2023-10-27T14:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: 4.26 to 4.28 upgrade of Expand widget containing a BasemapGallery widget not rendering upon expand</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-26-to-4-28-upgrade-of-expand-widget-containing-a/m-p/1342944#M82601</link>
      <description>&lt;P&gt;Hi, I'm having trouble reproducing the issue with your code above, and everything seems to be fine with our samples that use the Expand widget and BasemapGallery:&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/basemaps-portal/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/basemaps-portal/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Have you tried removing the Expand widget and just rendering the BasemapGallery on it's own? Let me know if that works for you or if you get similar errors. Also, if you could provide a simpler repro case in a codepen or codesandbox, that would help us get to the bottom of this much faster. Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 20:50:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-26-to-4-28-upgrade-of-expand-widget-containing-a/m-p/1342944#M82601</guid>
      <dc:creator>AnneFitz</dc:creator>
      <dc:date>2023-10-27T20:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: 4.26 to 4.28 upgrade of Expand widget containing a BasemapGallery widget not rendering upon expand</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-26-to-4-28-upgrade-of-expand-widget-containing-a/m-p/1343205#M82615</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/115266"&gt;@AnneFitz&lt;/a&gt;,&amp;nbsp;I have created a basic widget and it does seem to work. Looks like it is something else that has changed to make it behave differently than in 4.26. I will have to investigate further on my end.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 11:40:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-26-to-4-28-upgrade-of-expand-widget-containing-a/m-p/1343205#M82615</guid>
      <dc:creator>René_Ténière</dc:creator>
      <dc:date>2023-10-30T11:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: 4.26 to 4.28 upgrade of Expand widget containing a BasemapGallery widget not rendering upon expand</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-26-to-4-28-upgrade-of-expand-widget-containing-a/m-p/1418957#M84509</link>
      <description>&lt;P&gt;I have the same problem. Did you solve it?&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2024 22:08:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-26-to-4-28-upgrade-of-expand-widget-containing-a/m-p/1418957#M84509</guid>
      <dc:creator>GerardoDuarte_Hodgson</dc:creator>
      <dc:date>2024-05-03T22:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: 4.26 to 4.28 upgrade of Expand widget containing a BasemapGallery widget not rendering upon expand</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-26-to-4-28-upgrade-of-expand-widget-containing-a/m-p/1483348#M84769</link>
      <description>&lt;P&gt;I had issues with the Expand content only accepting Nodes when using the ESM library. I had to switch back to AMD. I also had an issue with the CSS styling and am currently using v4.25 for that..&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2024 16:50:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-26-to-4-28-upgrade-of-expand-widget-containing-a/m-p/1483348#M84769</guid>
      <dc:creator>YuriWorkTech</dc:creator>
      <dc:date>2024-06-03T16:50:43Z</dc:date>
    </item>
  </channel>
</rss>

