I'm working on my first application in WAB for Developers and have used the out of the box Basemap widget. After downloading the app, I customized the basemap widget configuration to re-order basemap items in the app and change out the thumbnails.
The basemap I'm using in the application is called 2013_Imagery and shows up in the basemap list with no thumbnail. I'd like to be able to rename this basemap and provide a thumbnail. However, I do not see that basemap listed in the config file. What gives? Where do I go to update this information?
Solved! Go to Solution.
I figured this out. The Basemap widget automatically adds the basemap of the current webmap to the list shown in the widget. I turned off this functionality by commenting out the following lines in the Widget.js beginning on line 137.
// if basemap of current webmap is not include, so add it.
for(i = 0; i < basemaps.length; i++) {
if (utils.compareSameBasemapByOrder(basemaps, webmapBasemap)) {
break;
}
}
if(i === basemaps.length) {
basemaps.push(webmapBasemap);
}
Is this where you configured your widget?
Initially, yes. And I did not add the 2013_Imagery there. It was already listed in the list of basemaps.
After downloading the app, I also changed configurations in the previously attached .json file but did't see 2013_Imagery in there to make the desired changes.
I figured this out. The Basemap widget automatically adds the basemap of the current webmap to the list shown in the widget. I turned off this functionality by commenting out the following lines in the Widget.js beginning on line 137.
// if basemap of current webmap is not include, so add it.
for(i = 0; i < basemaps.length; i++) {
if (utils.compareSameBasemapByOrder(basemaps, webmapBasemap)) {
break;
}
}
if(i === basemaps.length) {
basemaps.push(webmapBasemap);
}