Map image size

629
2
09-02-2013 03:22 AM
vinayb
by
New Contributor III
HI All,

  I am trouble with size of map , the document says that map takes size of div container it is placed in.Now i have div which has width 980px and height of 700px when the map is rendered it covers only half of div and there is lot of gap in the top  i checked if there was any top-margin defined but it was 0.When i checked the html code i see that that the server returns image of map which is of size of div and map portion is half of that , how can i overcome this .I want map to atleast cover 3/4 of div that i am using , below is map creation code
map = new esri.Map("mapContainer",{ 
      basemap: "streets", 
          center: [-83.275, 42.573], 
     zoom: 4 
     });
     var layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://10.32.9.106:6080/arcgis/rest/services/Administrative_Maps/World_Countries_v1/MapServer",{opacity:.20});
     map.addLayer(layer);
     console.log(" adding feature layer"+map.height);
     var url = "http://10.32.9.106:6080/arcgis/rest/services/Administrative_Maps/World_Countries_v1/MapServer/0";
     var info_content = "<table><tr><td><b>COUNTRY :</b></td><td style='text-align:right'>${COUNTRY}</td></tr></table>";
     var infoTemplate1 = new esri.InfoTemplate("${COUNTRY}", info_content);
     var fl = new esri.layers.GraphicsLayer(url, {
    id: "world-regions"
    
     });
0 Kudos
2 Replies
vinayb
by
New Contributor III
I resloved this using Extent is map constructor.
0 Kudos
JonathanUihlein
Esri Regular Contributor
Glad you fixed your issue! Don't forget to mark this thread as 'answered' if you no longer seek assistance.
0 Kudos