I am building a custom widget for WAB. To start with, I just want to build a button that switches between the 'streets' and the 'topo' basemap.
I created a working widget and in it I have this code:
let newMap = new Map("map", {
basemap: "streets",
center: [-105.255, 40.022],
zoom: 13
});
console.log("newMap")
console.log(newMap)
this.map = newMapWhich creates a new Map, and does not generate any errors, but also does not change the map.
I am guessing I need to do more than just `this.map = newMap`. But, what?
There is no documentation on this.