I am rookie to ArcGIS map. I am displaying map as background and placing some objects over it.When i save the page,the objects are going to background & map is coming foreground,so how to set the map as background layer. Second i am placing the objects on street,so i need to Zoom to max and how to do that.Please find my below code,
function init() { var initExtent = new esri.geometry.Extent({ xmin: -20098296, ymin: -2804413, xmax: 5920428, ymax: 15813776, spatialReference: { wkid: 54032} }); map = new esri.Map("map", { extent: initExtent });
//Donot know how to Zoom to max during the onload // map.ZoomFactor=0; // var Zoom = G_SATELLITE_MAP.getMaximumResolution(point); // map.setCenter(point, zoom); // var tiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://maps.dcgis.dc.gov/DCGIS/rest/services/DCGIS_DATA/DC_Basemap_WebMercator/MapServer"); map.addLayer(tiledMapServiceLayer);
} function showExtent(ext) { var s = ""; s = "XMin: " + ext.xmin + " YMin: " + ext.ymin + " XMax: " + ext.xmax + " YMax: " + ext.ymax; dojo.byId("onExtentChangeInfo").innerHTML = s; }
function locate() { map.graphics.clear(); var add = dojo.byId("address").value.split(","); var address = { Address : add[0], City: add[1], State: add[2], Zip: add[3] }; locator.addressToLocations(address,["Loc_name"]); }
function showResults(candidates) { var candidate; var symbol = new esri.symbol.SimpleMarkerSymbol(); var infoTemplate = new esri.InfoTemplate("Location", "Address: ${address}<br />Score: ${score}<br />Source locator: ${locatorName}");