Hide Table of Contents
Tutorials
About the API
Work with the API
Graphics and feature layers
Popups and Info Windows
Mobile
ArcGIS Server Services
References
What's New archive
Add a geographic search box to your app with a couple of lines of code. The widget defaults to the ArcGIS Online World Geocoding Service but can be customized to use one or more ArcGIS Server geocoding services.
Check out the samples that use this new widget.
The map class has new constructor options that can help you get your map set up using less code.
basemap: ArcGIS.com basemap. Possible values: "streets", "satellite", "hybrid", "topo", "gray", "oceans", "national-geographic" or "osm".
center: Array of two coordinates (longitude, latitude) or an esri.geometry.Point.
zoom: Starting zoom level for the map.
minZoom: Smallest scale zoom level for the map.
maxZoom: Largest scale zoom level for the map.
The map now auto-resizes so it is no longer necessary to set up an event listener for resize events on the map's container to call map.resize when a map's container resizes.
Below is a comparision of pre-3.3 code and equivalent 3.3 code.
Two new map methods, getBasemap and setBasemap, make switching basemaps easy. setBasemap accepts one of the strings mentioned above that corresponds to an ArcGIS.com basemap. If map.options.basemap was used to initially set the basemap, or the map's basemap was set with setBasemap, getBasemap will return the string that corresponds to the map's current basemap.
The map zoom controls now default to a "+" and "–" instead of a slider. The slider is available by passing sliderStyle: "large" to the map's via the constructor options object.
The map no longer requires a tiled or dynamic service to be the first type of layer added to the map. View the new Feature Layer in any projection sample to see this in action.
esri.geometry objects created without a spatial reference are assumed to be geographic and default to a spatial reference of WGS84 (wkid 4326). Instances of esri.geometry.Point have two new methods: getLatitude and getLongitude which return latitude or longitude if the point has geographic or web mercator coordinates. Otherwise, these methods return undefined. The map also has a geographicExtent property when the map is in geographic coordinates or web mercator.
The draw toolbar's rectangle, triangle, circle and ellipse tools support click + drag to define the size of each shape. The toolbar now also includes options to draw arrows in specific directions (up, down, left and right). The new options are shown in the drawing tools sample.
redraw method for feature layers that redraws features without going back to the service.
uniformScaling, which preserves aspect ratio when resizing graphics.
sliderStyle: "large" when creating a map.
lang="en" can break apps that use when using layout dijits and data-dojo-config(or dojoConfig) locale or extraLocale is not set. The recommended fix is to set locale or extraLocale on data-dojo-config or remove the lang="en" attribute. The specific error seen when this is an issue is "dojo/parser::parse() error TypeError" in Chrome and "TypeError: _72f(...) is undefined" in Firefox. More information is available in the Dojo bug tracker: http://trac.dojotoolkit.org/ticket/15630#comment:7 http://trac.dojotoolkit.org/ticket/15768#comment:6
Version 3.3 of the ArcGIS API for JavaScript uses Dojo 1.8.