I have a Web App Builder App in Portal using several ESRI widgets. I would like to use Basemap Toggle widget [1] that it is not contained in WAB. How should i do it? Thank you!
[1] https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle.html
Hi Shaylavi,
I know this is an old thread but I am looking for the same. The advantage of the Basemap toggle widget is that I only toggle between two basemaps instead of opening the pane of different basemaps (even if it contains only two) and then select the other one that is not just used.
This would be the appropriate API reference: https://developers.arcgis.com/javascript/3/jssamples/widget_toggle.html
Hello,
The link you added refers to the Javascript API version 4.x.
WAB is based on a different technology - Javascript API version 3.x.
There's already a Basemap toggle widget for the WAB and it's part of it as explained here: https://doc.arcgis.com/en/web-appbuilder/create-apps/widget-basemap.htm
If you'd like to build a new Basemap widget using the javascript API (which would be practically the same so I'm not sure why would you want that), the right link to create that code would be: https://developers.arcgis.com/javascript/3/jssamples/widget_basemap.html
Shay.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.