I've added some aerial basemaps with the basemap widget that don't have the same default LODs as the default basemap. Some have fewer zoom levels, and some require additional zoom levels. Is there an easy way to constrain/add zoom levels if a certain basemap is turned on with the basemap widget?
If not, I've been able to add an LOD to the map before it gets created, then use a zoom event handler to zoom back to the previous level if the user has a certain basemap turned on and attempts to zooms out of the range for that basemap. However, this creates an odd zoom in/ zoom out user experience. What I'd rather do is cancel the zoom event in this case. I could listen for zoom-start, but I can't find a way to cancel the map zoom. Does anyone know how to do this in the javascript API?