Thanks Manish,For example, I add a map with options
var option = {
// ESRI map options can be used still. For example, do not display "esri" logo.
logo : false,
center : [-74, 40.72],
maxZoom : 10,
minZoom : 1,
zoom : 3
};
var map = ... //create a esri map.
//then add layer to the map.
var layerConfig = {
url : "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer",
options : {
"opacity" : 0.5
};
var layer = new esri.layers.ArcGISDynamicMapServiceLayer(layerConfig.url,
layerConfig.options);
map.addLayer(layer);
//after the map is rendered and shown, then I call the get zoom function
var level = map.getZoom();
//the zoom level here is always -1, What I have set in the basemap is lost.
//and map.setZoom is also changed, although I can use map.setZoom(0) to zoom in and map.setZoom(1) to zoom out, but this
//kind of usage is not mentioned in the API