Select to view content in your preferred language

Map extent

655
4
04-27-2011 03:44 PM
DavidElies
Deactivated User
I've created a map with an ArcGISTiledMapServiceLayer.  Instead of using the explicit extent for the map, it appears to be using the extent from the ArcGISTiledMapServiceLayer.  I need to know how to explicitly set the extent that the map uses when it is first displayed.  This is the code I'm using with the service url hidden.

<esri:Map id="map">
   <esri:extent>
      <esri:Extent xmin="-60884403.02"
      ymin="657021.19"
      xmax="45425778.42"
      ymax="12202069.94"
      spatialReference="{new SpatialReference(102113)}"/>
   </esri:extent>
   <esri:ArcGISTiledMapServiceLayer
            url="http://DOMAIN/ArcGIS/rest/services/SERVICE/MapServer" />
</esri:Map>


Any help will be greatly appreciated.
Tags (2)
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
David,

   Since you are using a tiled map service try using the level property of the map to set your zoom level.
0 Kudos
DavidElies
Deactivated User
Thanks rscheitlin,

I find that the level does work.  I also thought that my extent was completely being ignored, but I found that it was not being ignored, but because I was trying to take advantage of the wrapAround180 feature in the new API to show the entire extent of the US, I was using an extent that didn't make sense.  I was using the expanded view of the world, zooming in and reading the map.extent to get the extent I wanted to use.  It didn't even occur to me that the extent I was using was gibberish.  There seems to be a bug with the wrap feature that keeps subtracting (or adding) as the map is scrolled past the dateline.  Thanks for your help.  Everything is working okay now.  I think some work needs to be done on the wrap feature before it's ready for me to use.  Thanks again!
0 Kudos
DasaPaddock
Esri Regular Contributor
Thanks rscheitlin,

I find that the level does work.  I also thought that my extent was completely being ignored, but I found that it was not being ignored, but because I was trying to take advantage of the wrapAround180 feature in the new API to show the entire extent of the US, I was using an extent that didn't make sense.  I was using the expanded view of the world, zooming in and reading the map.extent to get the extent I wanted to use.  It didn't even occur to me that the extent I was using was gibberish.  There seems to be a bug with the wrap feature that keeps subtracting (or adding) as the map is scrolled past the dateline.  Thanks for your help.  Everything is working okay now.  I think some work needs to be done on the wrap feature before it's ready for me to use.  Thanks again!


David, do you have a test case showing what you'd like to do when the wrap around is on? When wrap around is on, the map's extent behaves the same as when it's off. It's still linear.
0 Kudos
DavidElies
Deactivated User
Thanks for your response, dpaddock,

You're absolutely right.  It is linear.  I expected that the coordinates would be the same for the same point on Earth, no matter if the view was scrolled, (the Earth was rotated 360 degrees), but now I see that the x-coordinates reflect how many times you've "rotated" the globe.  It was a silly mistake on my part, but I sure was confused, thus this post.  Thanks for your help!
0 Kudos