AnsweredAssumed Answered

Setting the zoom level for my app's webmap

Question asked by laura_busolo@redlands.edu_univredlands on Aug 29, 2017
Latest reply on Aug 30, 2017 by laura_busolo@redlands.edu_univredlands

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,

Outcomes