Hide Table of Contents
What's New archive
What's new in Version 1.3

The following are new features in the ArcGIS JavaScript API version 1.3:

Support for Dojo 1.2.3

When you reference the ArcGIS JavaScript API in your code, you also get a reference to version 1.2.3 of the Dojo Toolkit. This version of Dojo contains a patch that will not be released until Dojo 1.3. If you use an externally hosted Dojo 1.2.3 such as the one on the AOL Content Delivery Network, you will continue to see the following issues:

  • NIM035978: Graphic markers change position when panning the map in IE7
  • NIM039419: After adding a marker element to an ArcGIS Server JavaScript API map, the marker symbol moves when panning in Internet Explorer 6 and 7.
  • NIM039287: onMouseMove event not firing for "older" graphics in IE when PictureMarkerSymbol is used for rendering.

Layer extensibility

You can write custom tiled and dynamic layers that can be added to your map. To get started, see Creating custom layer types.

Error handling

Every layer and task now has an onError event, which returns more detail about the error in a callback function.

  • *Task.command(..., callback?, errback?), *Task.onError. These return a JavaScript Error object and are called whenever an error occurs either by the REST service or when processing the results from the server. To catch any exceptions in processing request params, wrap the Task.operation call within a try { ... } catch (err) { ... } block.
  • The errback/onError functions receive an 'Error' object
  • Layer.onError(error): The Layer's onError event is fired either when the layer cannot be initialized or when the layer is unable to retrieve a tile/map image. For graphics layers, an error is returned any time the graphics layer is unable to draw a graphic.
  • In case of server side errors, 'code' (Number) and 'details' (String[]) properties are mixed into the Error object.

Enhanced map layer management

You can now add layers at specific indices in a map and also remove layers from a map.

  • Map.addLayer(layer, index?): A layer can be added at a specific index in the map. If no index is specified or the index specified is greater the current number of layers, the layer is automatically appended to the list of layers in the map and the index is normalized.
  • Map.removeLayer(layer) removes the argument layer from the map if it is part of the map. This fires the Map.onLayerRemove(layer) event.
  • Map.removeAllLayers() removes all layers from top to bottom. The Map.onLayerRemove event fires as each layer is removed, and the Map.onLayersRemoved event fires after all layers are removed
  • The Map's extent and spatial reference do not change even after all its layers have been removed. When the next layer is added, the layer is displayed at the same extent and spatial reference.

Other Map enhancements:

  • Map.setExtent(extent, fit?): The second optional parameter "fit" (Boolean) forces the map to fit the specified extent.
  • Map.position (esri.geometry.Point): This point geometry in screen coordinates represents the top left corner of the map container. This coordinate also acts as the origin for all screen coordinates returned by the Map and Map.graphics events.
  • The info window style matches the style of the theme applied: tundra, soria & nihilo.

I/O enhancements

  • esri.request(request, useProxy?): The optional argument "useProxy" (Boolean) forces a request to be made through the proxy. The esri.config.defaults.io.proxyUrl must be set before using this optional parameter.
  • esri.request now sends rawXhrPost if the content length is greater than 2000 characters or esri.defaults.io.proxy.alwaysUseProxy = true or useProxy = true
  • When constructing layers or tasks, if the URL specified includes additional query parameters, these parameters are included as part of every request for data by the layer or task. But if the query parameter name is the same as a REST parameter, it will be overridden with the value in the layer.
    var layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://.../service/MapServer?param1=value1&param2=value2&size=small&token=ABC");
    In this case, the requests to the map service will include all the above query parameters; however, the 'size' will be replaced by size=<image width>|<image height> which is a REST parameter for the size of the map image to be displayed.
  • esri.config.defaults.io.timeout (60 seconds): 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.

Other enhancements

  • In addition to GeometryService.project and simplify, the Graphics returned by labelPoints event or callback return the attributes for each of the label points. These attributes correspond to the Graphics passed to these functions.
  • A FeatureSet constructor has been added for using JSON.
  • esri.graphicsExtent(graphics): Returns the extent of all the graphics in the argument array, such as Map.graphics.graphic, FeatureSet.features, etc. If the width and height of the resulting extent are 0, null is returned.

Deprecations/Documentation fixes

  • esriConfig is now deprecated. Use esri.config.
  • Geoprocessor.checkJobStatus replaces Geoprocessor.checkJob in object model.

Bug fixes

The following are the identification numbers and summaries for bug fixes and enhancements in version 1.3 of the ArcGIS JavaScript API. Some of these summaries repeat information in the previous sections.

  • NIM036432: [JSAPI] Need to support functionality to add custom resources to JS API
  • NIM035978: Graphic markers change position when panning the map in IE7
  • NIM037245: Calling map.resize() after map has been panned causes the drawing toolbar to draw graphics incorrectly. Graphics are offset based on the distance and direction of the pan
  • NIM039269: Need a way to trap errors from JS API that occur during the execution of a geoprocessing task in synchronous mode
  • NIM039287: onMouseMove event not firing for "older" graphics in IE when PictureMarkerSymbol is used for rendering
  • NIM039419: After adding a marker element to an ArcGIS Server JavaScript API map, the marker symbol moves when panning in Internet Explorer 6 and 7
  • NIM040669: When identifying a multipart point layer in Internet Explorer 7, the graphic selection is displaced visually after zoom operation.
  • NIM040840: Rubberband zoom graphic displays improperly in Internet Explorer 6 or Internet Explorer 7 after calling map.Resize
  • NIM041273: In JavaScript API v1.2, the graphics layer does not work properly in Internet Explorer 6 and 7
  • NIM041482: Map applications keep downloading a non-existant picture/file when some action, e.g., toggling map layers, is done on the map (using IE)
Show Modal