Hide Table of Contents
What's new in Version 2.1

The following are new features in version 2.1 of the ArcGIS API for JavaScript.

Support for Dojo 1.5

When you reference the ArcGIS JavaScript API version 2.1, you get access to Dojo 1.5.

Read more about Dojo 1.5 here for more information.

New out of the box widgets

Several new out of the box widgets were added to enhance developer productivity.

  • The BasemapGallery widget displays a collection of basemaps.
  • The Legend widget creates a legend for the layers in the map.
  • The Scalebar adds a scalebar to the map.

Support for OGC Web Map Service (WMS)

View the API reference and sample for more details.

Updates

Added the following new properties, methods, events and constants to existing objects.

  • Added the ability to query for a feature count to the QueryTask and FeatureLayer classes. These new methods only work for layers published using ArcGIS Server 10 sp1 or greater.
  • Added the setTickCount method to the TimeSlider. This method allows you to specify the number of ticks to display on the slider.
  • Added the version property to ArcGISDynamicMapServiceLayer, ArcGISTiledMapServiceLayer, ArcGISImageServiceLayer, and FeatureLayer. Added the capability property to the ArcGISDynamicMapServiceLayer and ArcGISTiledMapServiceLayer.
  • Added minScale and maxScale properties to LayerInfo.
  • The following new constants were added to the Draw toolbar:
    • ARROW
    • CIRCLE
    • ELLIPSE
    • RECTANGLE
  • Updated the Edit toolbar to provide the ability to Scale or Rotate graphics.

Modifications

  • The esri.request method's options argument has the following properties:
    • useProxy: When true it forces the request to use the proxy.
    • usePost: Setting usePost to true indicates that the request should use the HTTP POST method. If the request URL is from another origin the proxy will be used as well.
  • Updated the esri.arcgis.utils.createMap response object to include itemInfo with the following format:
    itemInfo:{ item:<Object>, itemData:<Object> }
    The createMap method appends base for all basemap layers and operational for operational layers to the index of each layer in the map. This allows you to easily access either the basemap or operational layers.
    var layers = response.itemInfo.itemData.operationalLayers;

Bugs and Enhancements

In addition to the additions above, this release contains several bug fixes and enhancements including the following:

  • The OverviewMap dijit extent rectangle turns opaque when zooming out quickly. (NIM059798)
  • TimeSlider's setTimeStops method fails when the slider only has one thumb.(NIM061060)
  • Add double-tap to zoom-in and multi-finger tap to zoom out for iOS devices.
  • Enhance the touch-aware map control by adding support for double-tapping to zoom or finish editing/drawing depending on the context.
Show Modal