AnsweredAssumed Answered

Extents Problem

Question asked by txrpls on Aug 8, 2012
Latest reply on Aug 9, 2012 by geonetadmin
This is driving me nuts. I'm a newbie to Javascript and started working on this during a course I am taking. I'm trying to limit my initial view to the second image attached. The tiled layer is causing my headaches. The code below is what I am using:

unction init() {
    //var map = new esri.Map("mapDiv");       
         var map = new esri.Map("mapDiv", {
           extent: new esri.geometry.Extent({xmin:-10719077,ymin:3177160,xmax:-11321168,ymax:3474629, "SpatialReference": {"wkid":102100}})
         });
     
         //create tiled map layer
        var tiled = new esri.layers.ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
        //add layer to map
       map.addLayer(tiled);
       
        //create dynamic map layer

       var dynamic = new esri.layers.ArcGISDynamicMapServiceLayer("http://www.geoiddata.com/arcgis/rest/services/Hawk/MapServer") 
        //add layer to map
        map.addLayer(dynamic);
      
When I leave the tiled layer un-commented out I get the attached image one. When I comment it out I get image two which is what I am expecting with the street map as background.

Attachments

Outcomes