AnsweredAssumed Answered

set extent for DynamicMapServiceLayer

Question asked by roryhall on Jan 28, 2012
Latest reply on Jan 30, 2012 by roryhall
Hello, I have been working though the various examples of the JavaScript API with good success I might add, but have decided to venture outside the sample server of ESRI and have come unstuck. I have two layers esri.layers.ArcGISTiledMapServiceLayer("") and new esri.layers.ArcGISDynamicMapServiceLayer("");. If I do not set and extent the map works fine, but I want to set the extent to the second layer. When I try this the map no longer draws. I am thinking it has something to do with different spatial references but am able to get my head around the problem.
my code as follows:
<script type="text/javascript">     
      var map;     
      function init(){         
      map = new esri.Map("map");
      //map = new esri.Map("map",{extent: new esri.geometry.Extent({xmin:123.837890625, ymin:-36.2109375, xmax:176.572265625, ymax:-1.0546875} )});
      var tiled = new esri.layers.ArcGISTiledMapServiceLayer("");
      var layer = new esri.layers.ArcGISDynamicMapServiceLayer("");    

TIA ~ Rory