I'm a complete noob to Javascript and haven't done much programming in 15+ years, mainly autolisp. I have manage to get a map up and running using the identify with popup sample. http://www.geoiddata.com/pleasanton.html. My question is how do I limit the zoom in level so that I don't get the map data unavailable in background.I also wanted a scale bar so I stuck in the following (bold text): function mapReady(map){
dojo.connect(map,"onClick",executeIdentifyTask);
var scalebar = new esri.dijit.Scalebar({
map: map,
scalebarUnit:'english'
});
//create identify tasks and setup parameters
identifyTask = new esri.tasks.IdentifyTask("http://www.geoiddata.com/ArcGIS/rest/services/Pleasanton/Pleasanton/MapServer");
identifyParams = new esri.tasks.IdentifyParameters();
identifyParams.tolerance = 3;
identifyParams.returnGeometry = true;
identifyParams.layerIds = [3,4];
identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_ALL;
identifyParams.width = map.width;
identifyParams.height = map.height;
//resize the map when the browser resizes
dojo.connect(dijit.byId('map'), 'resize', map,map.resize);
}It works, but is that the best place to insert the scale bar code?