Setting the default basemap for application created using WAB Developer and Local Layer Widget.

3891
8
11-24-2015 01:48 PM
JasonBuck
New Contributor III

Hello.  I have an app that was created using the Web AppBuilder developer.  When I initially starting creating the app, I was prompted to choose a map from AGOL.  I have also put together a couple of basemaps using the Basemap widget. Right now, all three basemaps show up in the Basemap Gallery.  The problem I'm having is getting the application to display one of the basemaps that I created using the Basemap widget, rather than the one I had to choose when the application was first setup.  Is it possible to change or set a default basemap, other than the map I had to point to on AGOL?  Thanks.

Jason Buck

Tags (1)
0 Kudos
8 Replies
RobertScheitlin__GISP
MVP Emeritus

Jason,

   when using the Local Layer widget you can override any or all the layers specified in the WebMap, including the basemap. All you have to do is add a basemap layer in the Local Layer widget config.

0 Kudos
JasonBuck
New Contributor III

Robert,

Thank you.  Using the local layer widget, is it possible to use more than one basemap layer (similar to how the basemap gallery allows for choosing between basemaps)?

Jason

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jason,

   The LL widget will override the web maps default base map but you can still use the basemap gallery widget if you choose.

RajuGopinath
New Contributor III

Hi Robert:

Do you've to do any special configuration for having Locallayer widget's basemap replace the arcgis.com basemap? I am using WAB 2.2 and LL 2.2. Even though, I added my own basemap in LL, the default basemap is still showing as arcgis.com one. Thanks

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Raju,

   No there is nothing special to do. Once you add a basemap using the LL widget it will override the webmaps default one.

(by the way I saw your other thread and even with the LL widget there is no way to remove the dependency on AGOL/Portal from WAB apps).

RajuGopinath
New Contributor III

Thanks Robert. I am going thru' the pain of removing the dependency of arcgis.com webmap- so many hurdles and still not working. Do you suggest going into mapmanager and modifying the code to accept a webmap config.json file?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Raju,

   Sorry there are so many spots where WAB is tied to AGOL/Portal I would not even what to try.

RebeccaStrauch__GISP
MVP Emeritus

I agree with Robert, not worth the effort  (and may be against esri usage agreements since you are basically trying to reverse-engineer the software).  I also don't like the dependency, but at least with Portal you can keep it more in-house.

The option you have is to write your own using ArcGIS API for JavaScript | ArcGIS for Developers    There are samples so you can write many of the functions that WAB has, but it will take a lot more work to get it all to work.  Up side, you don't have to have as heavy of an app for those things you don't need and you can make it much easier to use your own services (without dependency on AGOL/Portal).  Downside, not as fast to whip up a new site.