Select to view content in your preferred language

Basemap Gallery Widget Toogle Feature

3782
3
07-08-2015 07:21 AM
GiovanniMarrero3
Occasional Contributor

Hello,

I'm trying to customize the basemap widget to toggle between aerial and topo with one click. Similar to this code: http://developers.arcgis.com/javascript/samples/widget_toggle/

I tried messing around in the config.json under the main WAB folder and under the BasemapGallery widget folder but no luck. Can anyone point me in the right direction on where to place the code?

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Giovanni,

   The basemap gallery widget in WAB is not something you would want to try and modify to make it a basemap toggle widget. You would be best to write a new widget using the JS API BasemapToggle Dijit.

RobertScheitlin__GISP
MVP Emeritus

Giovanni,

   Unfortunately it looks like there is something about the way WAB sets the basemap from the webmap that makes the BasemapToggle dijit not function properly. The basemap is switching but the webmaps basemap is still on top and not removed from the map.

Junshan Liu​ any ideas on this?

GiovanniMarrero3
Occasional Contributor

Thank you for checking on this and providing me with an additional idea to explore. It never occurred to me to create my own widget and replace the standard WAB basemap widget. 

0 Kudos