I have a JS application, and I want to set the zoom level to be a certain level when a user uses the Search Widget. At the moment, once the user searches for something, it zooms in way too much than required. Here's a snippet of what I added, that didn't work. There's a global variable for "CvepWebMapId", with the web map's ID.
// Creating map using the CvepWebMap variable
arcgisUtils.createMap(CvepWebMapId, "map").then(function (response) {
mapMain = response.map;
mapMain.setBasemap("topo");
mapMain.getLayer('defaultBasemap').setVisibility(false);
maxZoom: 11,