Hide Table of Contents
What's new in Version 2.5

The following new features were added at version 2.5

Identity Manager Widget

The Identity Manager widget streamlines access to secured services. The pre-2.5 recommended workflows were to do one of the following:

  • Use a long term token secured by referrer
  • Use a proxy page to handle and manage tokens and secure the proxy
The identity manager replaces both. It is now possible to interact with secure services (ArcGIS Server 10.0 SP1 or hosted on ArcGIS.com) with a single line of code:
dojo.require("esri.IdentityManager");

Enhancements to KML Support

The KMLLayer class now supports more features of network links, extended data, time aware KML files and the outSR option now supports well-known text spatial references.

Bookmark Manager Widget

A new widget for managing map extents. Bookmarks can be created on the fly by an application or they can be created from a array of JavaScript objects when an app loads. Two new samples show each use case:

Enhancements to Popups

The look and feel of the popup has been improved so that popups have a smaller footprint on the map:

Popus also have two new events: onMaximize and onResize that fire when a popup's maximize or restore button is clicked. The idea being an application could insert or remove content depending on the current size of the popup. Finally, popups are automatically attached to the map making this line of code no longer necessary:

dojo.place(popup.domNode, map.root);

Support for Cross Origin Resource Sharing(CORS)

HTML5 Powered with Device Access Cross Origin Resource Sharing is a specification that outlines how browsers can do cross domain requests which are normally not allowed due to the same origin policy. Version 2.5 of the ArcGIS API for JavaScript supports CORS via an array of server URLs specified in esri.config.defaults.io.corsEnabledServers. To successfully use CORS, web servers must also be configured to support it. enable-cors.org is a fantastic resource for enableing CORS. . Refer to caniuse.com for a list of browsers that support CORS.

General API Enhancements

Version 2.5 brings some general API changes:

  • Support for the latest ArcGIS Online webmap
  • The scale bar widget now has a destroy() method
  • Support for freehand drawing tools in iOS
  • To handle resize of the browser or map, use this code:
    dojo.connect(map, 'onLoad', function() {
      dojo.connect(dijit.byId('map'), 'resize', map, map.resize);
    });
              
  • It is no longer necessary to use a timer to respond to resize events as repeated map.resize() calls in a short time period are ignored. Default value is 300ms and this can be changed via the constructor option named resizeDelay

Bug Fixes

Bug fixes for 2.5 include:

  • NIM070682: The popup widget doesn't localize the words "Attachments:" and "Zoom to" in the popup.
  • NIM072536: BasemapGallery does not honor "opacity" for openstreetmap layer and bing layers.
  • NIM072537: Add dropdown to specify DD or DMS for the location tool in the measurement widget.
  • NIM071052: The mobile popup widget (esri.dijit.PopupMobile) does not work correctly in Android's browser for viewing additional information about that feature in a new panel.

Dojo 1.6.1

Version 2.5 of the ArcGIS API for JavaScript uses Dojo 1.6.1.