Note: "esri.config" is a replacement to "esriConfig" as of version 1.3. If you are using version 1.2 or lower, you should refer to Default API configurations for v1.2 and lower. For version 1.3 or higher, you use "esri.config" in place of "esriConfig". Although "esriConfig" will continue to work with version 1.3, you should update your applications to use "esri.config" instead.
The ArcGIS JavaScript API has some default configurations that can be overridden programatically. An example configuration is the symbol used for the rubber band zoom box. In the following code, the variable zoomSymbol is initialized. In the next line, the default zoomSymbol is overridden with the new symbol.
var zoomSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASHDOT, new dojo.Color([0,0,255]), 2), new dojo.Color([255,255,0,0.5]));
esri.config.defaults.map.zoomSymbol = zoomSymbol.toJson();
The following list contains the default JavaScript API configurations:
esri.config.defaults.map.panDuration
The length of time in milliseconds that the map will take to pan from one extent to another.
Default: 300
esri.config.defaults.map.panRate
The length of time in milliseconds that the map will refresh as it pans to the next extent.
Default: 50
esri.config.defaults.map.slider
The parameters that define the location, size, and orientation of the slider.
Default: {left:"30px",top:"30px",width:null,height:"200px"}
esri.config.defaults.map.sliderLabel
The parameters that define the slider tick and accompanying tick label. If this is null then the slider will not show tick marks.
Default: {tick:5,labels:null,style:"width:2em; font-family:Verdana; font-size:75%;"}
esri.config.defaults.map.zoomDuration
The length of time in milliseconds that the map will take to zoom from one extent to another.
Default: 300
esri.config.defaults.map.zoomRate
The length of time in milliseconds that the map will refresh as it zooms to the next extent.
Default: 50
esri.config.defaults.map.zoomSymbol
The SimpleFillSymbol to use to represent the color, fill, and outline properties of the RubberBand zoom. This is the JSON representation of the SimpleFillSymbol.
Default: {color:[0,0,0,64],outline:{color:[255,0,0,255],width:1.5,style:"esriSLSSolid"},style:"esriSFSSolid"}
esri.config.defaults.io.alwaysUseProxy
Whether or not to always use the proxy for communication to a REST endpoint.
Default: FALSE
esri.config.defaults.io.proxyUrl
The location of the proxy url that should be used when posting large payloads to an endpoint. This must reside on the same domain as the HTML application.
Default: null
esri.config.defaults.io.timeout
Each request through esri.request
is allowed up to 60 seconds to respond. If no response is returned or a
server-side error is returned, the esri.Error and error back handlers are
called, in that order. (As of 1.3)
Default: 60 seconds