Zoom and extents in ArcGIS JS API

Idea created by dhunink on Apr 23, 2013
    New
    Score10
    • dhunink
    Hi There,

    I thought it would be a nice idea to make more clear how initial extents on the server ar honered in respect to the initial extent set in the script and, more important, the zoomlevel. Since the initial extent on a hosted ArcGIS Online Service can't be edited, users most now how to override it. Which is possible with initialExtent in the API, but not with the zoom function in the API.

    For example, the following code will not really get you zoom level 4, when the server has an initialExtent defined, although http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/map.html doesn't mention that. 

         map = new esri.Map("map",{ 
         zoom: 4,
         outFields: ["*"],//Return all fields 
         sliderStyle: "large"
         });