Hide Table of Contents
esri
Map
toolbars
Class: Map
[ AMD Module Require | Legacy Module Require ]

Module Require

dojo.require("esri.map");

Description

The esri.Map class creates a container and required DOM structure for adding layers, graphics, an info window, and other navigation controls.

Typically, a map is added to a page using a DIV. The map's width and height are initialized to those of the DIV container.

The Map.onLoad event is fired after the first layer has been added to the map. At this point, the map is fully functional. A Map.onLoad handler function should be used to add content and change map behaviors.

For an introduction on using the Map class, see Adding a map.

Samples

Search for samples that use this class.

Class hierarchy

esri.Map

Constructors

ConstructorDescription
new esri.Map(divId,options?)Creates a new map inside of the given HTML container, which is often a DIV element. The size of the map is the size of the container. The Map constructor can also include optional parameters. The optional parameters can be included in any order.

CSS

CSS ClassDescription
esriAttributionRepresents the map attribution node.
.esriAttribution{
  color:#B20000 !important;
  font-weight:bold;
}
esriAttributionOpenRepresents the map attribution node when it is open i.e., it is clicked. Use this class to define CSS rules that apply to the attribution only when it is open.
.esriAttributionOpen{
  font-style:italic;
}

Properties

PropertyTypeDescription
attributionAttributionReference to the attribution widget created by the map when map attribution is enabled.
autoResizeBooleanValue is true when the map automatically resizes if the browser window or ContentPane widget enclosing the map is resized. Otherwise false. 
extentExtentThe current extent of the map in map units. This property is read-only.
fadeOnZoomBooleanIndicates if the fade effect is enabled while zooming. Only applicable when navigationMode is set to 'css-transforms'. The default value is true.
force3DTransformsBooleanWhen the mapNavigation mode is set to 'css-transforms', CSS3 transforms will be used for map navigation when supported by the browser. It is recommended that you let the map determine when to enable transformations to avoid running into a known issue with scrollbar rendering on Chrome on Windows XP.
geographicExtentExtentThe extent (or bounding box) of the map in geographic coordinates. Available only when the map's spatial reference is Web Mercator or Geographic (wkid 4326). 
graphicsGraphicsLayerProvides access to the Map's GraphicsLayer. The graphics object is available to use after the Map.onLoad event.
graphicsLayerIdsString[]An array of the current GraphicsLayers in the map.
heightNumberCurrent height of the map in screen pixels.
idStringReference to HTML DIV or other element where the map is placed on the page. This property is set in the Map constructor.
infoWindowPopupDisplays the InfoWindow on a map.
isClickRecenterBooleanWhen true, the key sequence of shift then click to recenter the map is enabled.
isDoubleClickZoomBooleanWhen true, double click zoom is enabled. This allows a user to zoom and recenter the map by double clicking the mouse.
isKeyboardNavigationBooleanWhen true, keyboard navigation is enabled. This allows users to pan the keyboard using the arrow keys and to zoom using the + and - keys.
isPanBooleanWhen true, map panning is enabled using the mouse.
isPanArrowsBooleanWhen true, pan arrows are displayed around the edge of the map.
isRubberBandZoomBooleanWhen true, rubberband zoom is enabled. This allows users to draw a bounding box zoom area using the mouse.
isScrollWheelZoomBooleanWhen true, the mouse scroll wheel zoom is enabled.
isShiftDoubleClickZoomBooleanWhen true, shift double click zoom is enabled. This allows a user to zoom and recenter the map by shift + double clicking the mouse.
isZoomSliderBooleanWhen true, the zoom slider is displayed on the map.
layerIdsString[]Array of current TiledMapServiceLayers and DynamicMapServiceLayers added to the map.
loadedBooleanAfter the first layer is loaded, the value is set to true.
navigationModeStringIndicates whether the map uses CSS3 transformations when panning and zooming. In 'css-transform' mode the map will use CSS3 transformations, if supported by the browser, to provide a smoother experience while panning and zooming the map.
positionPointThis point geometry in screen coordinates represent the top-left corner of the map container. This coordinate also acts as the origin for all screen coordinates returned by Map and GraphicsLayer events.
rootDOMNodeThe DOM node that contains the container of layers, build-in info window, logo and slider.
showAttributionBooleanWhen true, map attribution is enabled.
snappingManagerSnappingManagerIf snapping is enabled on the map using map.enableSnapping() this property provides access to the SnappingManager. The snapping manager's setLayerInfo method can be used to modify the target snapping layers.
spatialReferenceSpatialReferenceThe spatial reference of the map. See Projected Coordinate Systems and Geographic Coordinate Systems for the list of supported spatial references.
timeExtentTimeExtentThe current TimeExtent for the map. Use the setTimeExtent method to modify the time extent.
widthNumberCurrent width of the map in screen pixels.

Methods

MethodReturn ValueDescription
addLayer(layer,index?)LayerAdds an ESRI Layer to the map.

The return object of Layer was added at v1.4.
addLayers(layers)NoneAdds multiple layers to a map. The array order corresponds to the layer order in the client side map.
centerAndZoom(mapPoint,levelOrFactor)DeferredCenters and zooms the map.

At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the operation is completed.
centerAt(mapPoint)DeferredCenters the map based on map coordinates as the center point.
At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the map has been re-centered to the given point.
destroy()NoneDestroys the map instance. After the map is destroyed it is no longer valid however you can re-use the div element of the map to create a new map instance.
disableClickRecenter()NoneDisallows clicking on a map to center it.
disableDoubleClickZoom()NoneDisallows double clicking on a map to zoom in a level and center the map.
disableKeyboardNavigation()NoneDisallows panning and zooming using the keyboard.
disableMapNavigation()NoneDisallows all map navigation except the slider and pan arrows.
disablePan()NoneDisallows panning a map using the mouse.
disableRubberBandZoom()NoneDisallows zooming in or out on a map using a bounding box.
disableScrollWheelZoom()NoneDisallows zooming in or out on a map using the mouse scroll wheel.
disableShiftDoubleClickZoom()undefinedDisallows shift double clicking on a map to zoom in a level and center the map.
disableSnapping()NoneDisables snapping on the map.
enableClickRecenter()NonePermits users to click on a map to center it.
enableDoubleClickZoom()NonePermits users to double click on a map to zoom in a level and center the map.
enableKeyboardNavigation()NonePermits users to pan and zoom using the keyboard.
enableMapNavigation()NoneAllows all map navigation.
enablePan()NonePermits users to pan a map using the mouse.
enableRubberBandZoom()NonePermits users to zoom in or out on a map using a bounding box.
enableScrollWheelZoom()NonePermits users to zoom in or out on a map using the mouse scroll wheel.
enableShiftDoubleClickZoom()NonePermits users to shift double click on a map to zoom in a level and center the map.
enableSnapping(snapOptions?)SnappingManagerEnable snapping on the map when working with the Editor, Measurement widget or the Draw and Edit toolbars.
getBasemap()String Returns the name of the current basemap. 
getInfoWindowAnchor(screenCoords)StringSets an InfoWindow's anchor when calling InfoWindow.show.
getLayer(id)LayerReturns an individual layer of a map.
getLayersVisibleAtScale()Layer[]Return an array of layers visible at the current scale.
getLevel()NumberGets the current level of detail for the map. Valid only with an ArcGISTiledMapService layer.
getMaxScale()NumberReturns the maximum visible scale of the map. You cannot zoom-in beyond this scale. A value of 0 indicates that the map does not have a maximum scale constraint. 
getMaxZoom()NumberReturns the maximum zoom level of the map. You cannot zoom in beyond this value. A value of -1 indicates that the map does not have pre-defined zoom levels.
getMinScale()NumberReturns the minimum visible scale of the map. You cannot zoom out beyond this scale. A value of 0 indicates that the map does not have a maximum scale constraint. 
getMinZoom()NumberReturns the minimum zoom level of the map.You cannot zoom out beyond this value.  A value of -1 indicates that the map does not have pre-defined zoom levels. 
getScale()NumberReturns the current map scale.
getZoom()NumberReturns the current zoom level of the map. A value of -1 indicates that the map does not have pre-defined zoom levels.
hidePanArrows()NoneHides the pan arrows from the map.
hideZoomSlider()NoneHides the zoom slider from the map.
panDown()DeferredPans the map south. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.
panLeft()DeferredPans the map west. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.
panLowerLeft()DeferredPans the map southwest. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.
panLowerRight()DeferredPans the map southeast. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.
panRight()DeferredPans the map east. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.
panUp()DeferredPans the map north. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.
panUpperLeft()DeferredPans the map northwest. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.
panUpperRight()DeferredPans the map northeast. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.
removeAllLayers()NoneRemoves all layers from the map.

The map's extent, spatial reference, and tiling scheme if defined do not change when the layers are removed. When the next layer is added to the map, this layer is displayed at the same extent and spatial reference.
removeLayer(layer)NoneRemoves the specified layer from the map.
reorderLayer(layer,index)NoneChanges the layer order in the map.
reposition()NoneRepositions the map DIV on the page. This method should be used after the map DIV has been repostioned.
resize(immediate?)NoneResizes the map DIV. This method should be used after the map DIV has been resized.
setBasemap(basemap)NoneChange the map's current basemap. 
setExtent(extent,fit?)Deferred.Sets the extent of the map. The extent must be in the same spatial reference as the map.
At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the extent change has been committed by the map.
setLevel(level)DeferredSets the map to the specified level. Zooms to the new level based on the current map center point. Valid only with an ArcGISTiledMapService layer.

At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the zoom level has been changed.
setMapCursor(cursor)NoneSets the default cursor for the map. This cursor is shown whenever the mouse is pointed over the map, except when panning by dragging the map or using SHIFT+Drag to zoom. If not set, the map uses the platform-dependent default cursor, usually an arrow.
setScale(scale)DeferredSets the map scale to the specified value. The value must be greater than 0.

At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the map scale has been changed.
setTimeExtent(timeExtent)NoneSets the TimeExtent for the map.
setTimeSlider(timeSlider)NoneSet the time slider associated with the map.
setZoom(zoom)DeferredSet the map zoom level to the given value. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the zoom level has been changed.
showPanArrows()NoneShows the pan arrows on the map.
showZoomSlider()NoneShows the zoom slider on the map.
toMap(screenPoint)PointConverts a single screen point or an array of screen points to map coordinates.
toScreen(mapPoint)PointConverts a single map point or an array of map points to screen coordinates.

Events

[ On Style Events | Connect Style Events ]

All On Style event listeners receive a single event object. The event properties listed below are accessed from this event object. Additionally, the event object also contains a 'target' property whose value is the object which fired the event.
On EventEvent PropertiesDescription
basemap-changeNoneFired when the map's basemap is changed. Should be used in favor of onBaseChange
click<MouseEvent> <MouseEvent>Fires when a user single clicks on the map using the mouse and the mouse pointer is within the map region of the HTML page. Should be used in favor of onClick
dbl-click<MouseEvent> <MouseEvent>Fires when a user double clicks on the map using the mouse and the mouse pointer is within the map region of the HTML page. Should be used in favor of onDblClick
extent-change<Extent> extent
<Point> delta
<Boolean> levelChange
<LOD> lod
Fires when the extent of the map has changed. Should be used in favor of onExtentChange
key-down<KeyboardEvent> <KeyboardEvent>Fires when a keyboard key is pressed. Should be used in favor of onKeyDown
key-up<KeyboardEvent> <KeyboardEvent>Fires when a keyboard key is released. Should be used in favor of onKeyUp
layer-add<Layer> layerFires any time a layer is added to the map. Should be used in favor of onLayerAdd
layer-add-result<Layer> layer
<Error> error
Fires after specified layer has been added to the map. Should be used in favor of onLayerAddResult
layer-remove<Layer> layerFires after the layer has been removed. Should be used in favor of onLayerRemove
layer-reorder<Layer> layer
<Number> index
Fires when the map layer order has been changed. Should be used in favor of onLayerReorder
layer-resume<Layer> layerFires when a map layer resumes drawing. Should be used in favor of onLayerResume
layers-add-result<Layer[]> layersFires after all layers are added to the map using the map.addLayers method. Should be used in favor of onLayersAddResult.
layers-removedNoneFires after all the layers have been removed. Should be used in favor of onLayersRemoved
layers-reordered<Number[]> layerIdsFires when all the layers have been reordered. Should be used in favor of onLayersReordered
load<Map> mapFires when the first or base layer has been successfully added to the map. Should be used in favor of onLoad
mouse-down<MouseEvent> <MouseEvent>Fires when a mouse button is pressed down and the mouse cursor is in the map region of the HTML page. Should be used in favor of onMouseDown
mouse-drag<MouseEvent> <MouseEvent>Fires while the mouse is being dragged until the mouse button is released. Should be used in favor of onMouseDrag
mouse-drag-end<MouseEvent> <MouseEvent>Fires when a mouse button is released and the user stops dragging the mouse. Should be used in favor of onMouseDragEnd
mouse-drag-start<MouseEvent> <MouseEvent>Fires when a mouse button is pressed down and the user starts to drag the mouse. Should be used in favor of onMouseDragStart
mouse-move<MouseEvent> <MouseEvent>Fires any time the mouse pointer moves over the map region. A common use for this event is to show the current x,y coordinate of the map as the user moves the mouse pointer. Should be used in favor of onMouseMove
mouse-out<MouseEvent> <MouseEvent>Fires when the mouse moves out of the map region of the HTML page. Should be used in favor of onMouseOut
mouse-over<MouseEvent> <MouseEvent>Fires when the mouse moves into the map region of the HTML page.. Should be used in favor of onMouseOver
mouse-up<MouseEvent> <MouseEvent>Fires when the mouse button is released and the mouse pointer is within the map region of the HTML page. Should be used in favor of onMouseUp
mouse-wheel<MouseEvent> <MouseEvent>Fires when the mouse wheel is scrolled. Should be used in favor of onMouseWheel
pan<Extent> extent
<Point> delta
Fires during the pan process. Should be used in favor of onPan
pan-end<Point> delta
<Extent> extent
Fires when the pan is complete. Should be used in favor of onPanEnd
pan-start<Extent> extentFires when a user commences panning. Should be used in favor of onPanStart
reposition<Number> x
<Number> y
Fires when the map DIV is repositioned. Should be used in favor of onReposition
resize<Extent> extent
<Number> width
<Number> height
Fires when the map's container has been resized. Should be used in favor of onResize
time-extent-change<TimeExtent> timeExtentFires when the map's timeExtent property is set. Should be used in favor of onTimeExtentChange
unload<Map> mapFires when the page is refreshed. Should be used in favor of onUnload
update-end<Error> errorFires after layers that are updating their content have completed. This event is often used in combination with onUpdateStart to display a 'Map is busy' or 'Loading...' message as visual feedback to the end-user.. Should be used in favor of onUpdateEnd
update-startNoneFires when one or more layers being updating their content. This event is often used in combination with onUpdateEnd to display a 'Map is busy' or 'Loading...' message as visual feedback to the end-user. Should be used in favor of onUpdateStart
zoom<Extent> extent
<Number> zoomFactor
<Point> anchor
Fires during the zoom process. Should be used in favor of onZoom
zoom-end<Extent> extent
<Number> zoomFactor
<Point> anchor
<Number> level
Fires when the zoom is complete. Should be used in favor of onZoomEnd
zoom-start<Extent> extent
<Number> zoomFactor
<Point> anchor
<Number> level
Fires when a user commences zooming. Should be used in favor of onZoomStart
Constructor Details

new esri.Map(divId,options?)

Creates a new map inside of the given HTML container, which is often a DIV element. The size of the map is the size of the container. The Map constructor can also include optional parameters. The optional parameters can be included in any order.
Parameters:
<String> divIdRequiredContainer id for the referencing map. Required.
<Object> optionsOptionalOptional parameters. See options list.
Options:
<Number> attributionWidthWidth of the attribution node relative to the map width. The default value is 0.45 i.e., 45% of the map width. As of v 3.1.
<Boolean > autoResizeWhen true the map will automatically resize when the browser window is resized or when the ContentPane widget enclosing the map is resized. The default value is true. 
<String> basemapSpecify a basemap for the map. The following are valid options: "streets" , "satellite" , "hybrid", "topo", "gray", "oceans", "national-geographic", "osm". As of version 3.3
<Number[] | Point> centerThe location where the map should be centered. Enter the location as an array containing longitude and latitude (for example, [-98, 40]) or as an esri.geometry.Point. As of version 3.3
<Boolean> displayGraphicsOnPanWhen true, graphics are displayed during panning. When false, the graphics are turned off during pan movement. Setting to false may improve performance in Internet Explorer. The default is true.
<Extent> extentIf provided, the extent and projection of the map is set to the properties of Extent. Once the projection is set, all layers must be able to be drawn in the defined projection. The tiling scheme of an ArcGISTiledMapServiceLayer must match the projection of the map. The projection of the extent is honored as of v1.2 when used in the map constructor.
function init() {

  var map = new esri.Map("map", {
    extent: new esri.geometry.Extent({xmin:-20098296,ymin:-2804413,xmax:5920428,ymax:15813776,spatialReference:{wkid:54032}})
  });
  var dynamicMSLayer = new esri.layers.ArcGISDynamicMapServiceLayer
        ("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer")
  map.addLayer(dynamicMSLayer);
}
<Boolean> fadeOnZoomWhen true a fade effect is enabled for supported layers. Currently only tiled layers are supported. This option is not applicable if navigationMode is set to classic. (As of v2.6)
var map = new esri.Map("map",{
  extent:initExtent,
  fadeOnZoom:true
});
<Boolean> fitExtentWhen true, for maps that contain tiled map service layers, you are guaranteed to have the initial extent defined using the extent constructor option shown completely on the map. As of v2.0
var map = new esri.Map("map",{extent:initExtent,fitExtent:true});
<Boolean> force3DTransformsWhen the mapNavigation mode is set to 'css-transforms', CSS3 transforms will be used for map navigation when supported by the browser. It is recommended that you let the map determine when to enable transformations to avoid running into a known issue with scrollbar rendering on Chrome on Windows XP.(As of v2.6)
  map = new esri.Map("map",{
    extent:initExtent,
    force3DTransforms:true
  });
var map = new esri.Map("map",{
  extent:initExtent,
  force3DTransforms:true
});
<InfoWindowBase> infoWindowBy default the map creates and uses an out-of-the-box Popup. If you create a custom implementation using InfoWindowBase specify it using this option.
var infoWindow = new myModules.InfoWindow({
  domNode: dojo.create("div", null, dojo.byId("map"))
}); 

var map = new esri.Map("map", {
  extent: initExtent,
  infoWindow:infoWindow
});
<LOD[]> lodsIf provided, the map is initialized with the specified levels of detail. All ArcGISTiledMapServiceLayers added to the map must have matching resolutions in order to be displayed. (As of v1.2)
var lods = [
  {"level" : 0, "resolution" : 0.010986328125, "scale" : 4617149.97766929},
  {"level" : 1, "resolution" : 0.0054931640625, "scale" : 2308574.98883465},
  {"level" : 2, "resolution" : 0.00274658203125, "scale" : 1154287.49441732},
  {"level" : 3, "resolution" : 0.001373291015625, "scale" : 577143.747208662},
  {"level" : 4, "resolution" : 0.0006866455078125, "scale" : 288571.873604331}
];

var map = new esri.Map("map", {
  lods: lods
});
<Boolean> logoDisplay the esri logo on the map. The default value is true.
 map = new esri.Map("map", {
   extent: initExtent,
  logo:false
 });
<Number> maxScaleMaximum visible scale of the map. You cannot zoom in beyond this scale. The value will be further adjusted based on the maxZoom. As of version 3.3
<Number> maxZoomMaximum map zoom level. You cannot zoom out beyond this level. If a value is not provided, the maximum zoom level will be calculated based on maxScale or the maximum zoom level supported by the basemap. As of version 3.3
<Number> minScaleMinimum visible scale of the map. You cannot zoom out beyond this scale. The specified value will be further adjusted based on the minZoom. As of version 3.3
<Number> minZoomMinimum map zoom level. You cannot zoom out beyond this level. If a value is not provided, the minimum zoom will be calculated based on maxScale or the maximum zoom level supported by the basemap. As of version 3.3
<Boolean> navDisplays pan buttons on map. When false, the pan arrows never display. The default is false.
<String> navigationModeSpecify whether or not to use CSS3 transformations when panning and zooming. Valid values are "css-transforms" or "classic". If not specified, CSS3 transforms will be used when supported by the browser. Advantages of using CSS3 transforms are a smoother, less jarring experience during map navigation and hardware acceleration in browsers that support it. (As of v2.6)
var map = new esri.Map("map",{
  extent: initExtent,
  navigationMode: 'classic'
});
<Number> resizeDelaySpecify a time period in milliseconds to ignore repeated calls to the resize method. Default value is 300.
<Number> scaleInitial map scale. If a value is not provided, the scale will be calculated based on the initial extent of the basemap. As of version 3.3
<Boolean> showAttributionEnable or disable map attribution display. The attribution is displayed at the bottom of the map next to the Esri logo. The default value is true unless you are using the compact build then the default is false. To add attribution with the compact build import the esri.dijit.Attribution module and enable showAttribution. As of v 3.1
<Boolean> showInfoWindowOnClickThe default behavior is to show an InfoWindow if the Graphic has a defined InfoTemplate when the user clicks on the graphic. When true, this default behavior is honored. The default value is true.
<Boolean> sliderDisplays a slider on the map. When false, the slider never displays. Default is true.
<String[]> sliderLabelsDefine labels for the slider. Only valid when the sliderStyle is set to large. As of version 3.3
<String> sliderOrientationOrientation of the zoom slider. Valid values are: "vertical" or "horizontal". The default value is "vertical". As of version 3.3
<String> sliderPositionPosition of the zoom slider within the map control. Valid values are: "top-left", "top-right", "bottom-left", "bottom-right". The default value is "top-left". As of version 3.3
<String> sliderStyleDefines the slider style. At version 3.3 the small slider is displayed by default. Valid values are 'small' or 'large'.
<Boolean> wrapAround180When true, supports continuous pan across the dateline. Wraparound is supported in the following cases:
  • Map spatial reference is WGS84 or Web Mercator
  • The tiling scheme is either the pre-9.3 ArcGIS Online (4326) tiling scheme or ArcGIS/Google Maps/ Bing tiling scheme.
  • Dynamic services must be version 10 or greater.
At version 3.1 the default value is true. For versions earlier than 3.1 the default value is false.
<Number> zoomInitial zoom level of the map. If a value is not provided, it will be calculated based on the initial extent of the basemap. As of version 3.3
Code Snippet:
  • In this example, a new map named "mymap" is created and will be placed inside a container named "mapDiv".
    var myMap;
    function init() {
      //create map
      myMap = new esri.Map("mapDiv");
    
      ...
    }
    
    Later in the code, the map container is referenced in the DIV id.
    <div id="mapDiv" style="width:600px; height:600px; border:1px solid #000;"></div>
    
  • In this second example, the optional extent parameter is also included in the constructor.
    var myMap = new esri.Map("mapDiv", { extent: new esri.geometry.Extent
    (-124.71, 31.89, -113.97, 42.63) });
    
  • This example creates a map with no slider or pan arrows.
    var myMap = new esri.Map("mapDiv", { slider:false, nav:false });
    
  • In this example, graphics are turned off whenever the map is panned.
    var myMap = new esri.Map("mapDiv", { displayGraphicsOnPan:false });
    

    If you want the graphics turned off during a pan only for Internet Explorer, use the following constructor:
    var myMap = new esri.Map("mapDiv", { displayGraphicsOnPan:! dojo.isIE });
    
Property Details

<Attribution> attribution

Reference to the attribution widget created by the map when map attribution is enabled.

<Boolean> autoResize

Value is true when the map automatically resizes if the browser window or ContentPane widget enclosing the map is resized. Otherwise false. 

<Extent> extent

The current extent of the map in map units. See Setting and using extents in a map for more information about extents.
Code Snippet:
function showExtent() {
  var s = "";
  s = "XMin: "+ myMap.extent.xmin
      +" YMin: " + myMap.extent.ymin
      +" XMax: " + myMap.extent.xmax
      +" YMax: " + myMap.extent.ymax;
      dojo.byId("info").innerHTML = s;
}

<Boolean> fadeOnZoom

Indicates if the fade effect is enabled while zooming. Only applicable when navigationMode is set to 'css-transforms'. The default value is true.

<Boolean> force3DTransforms

When the mapNavigation mode is set to 'css-transforms', CSS3 transforms will be used for map navigation when supported by the browser. It is recommended that you let the map determine when to enable transformations to avoid running into a known issue with scrollbar rendering on Chrome on Windows XP.

<Extent> geographicExtent

The extent (or bounding box) of the map in geographic coordinates. Available only when the map's spatial reference is Web Mercator or Geographic (wkid 4326). 
Code Snippet:
dojo.connect(map, "onExtentChange", function(){
  var geo = map.geographicExtent;
  console.log(geo.xmin, geo.ymin, geo.xmax, geo.ymax);
});

<GraphicsLayer> graphics

Provides access to the Map's GraphicsLayer. The graphics object is available to use after the Map.onLoad event.
Code Snippet:
 
 dojo.connect(map, "onLoad", function() { ShowLocation(-81.3765, 28.54175); });   

 function ShowLocation(x, y) 
{
  var point = new esri.geometry.Point(x, y, new esri.SpatialReference({wkid:4326}));

  var simpleMarkerSymbol = new esri.symbol.SimpleMarkerSymbol();
  var graphic = new esri.Graphic(point, simpleMarkerSymbol);
  
  map.graphics.add(graphic);
}

<String[]> graphicsLayerIds

An array of the current GraphicsLayers in the map.
See Also: layerIds

<Number> height

Current height of the map in screen pixels. This property is read-only. The height and width of the map are normally set in the HTML DIV or other HTML element containing the map container.
Code Snippet:
function getMapWidthHeight() {
  alert("Width = " + myMap.width + "; Height = " + myMap.height);
}  

<String> id

Reference to HTML DIV or other element where the map is placed on the page. This property is set in the Map constructor.
Code Snippet:
var myMap = new esri.Map("mapDiv");

<Popup> infoWindow

Displays the InfoWindow on a map.

<Boolean> isClickRecenter

When true, the key sequence of shift then click to recenter the map is enabled. See Map navigation for more details.
Known Values: true | false
Default Value: true
Code Snippet:
function stopClickRecenter() {
  myMap.disableClickRecenter();
  dojo.byId("stopClickRecenter").value = myMap.isClickRecenter;
}

<Boolean> isDoubleClickZoom

When true, double click zoom is enabled. This allows a user to zoom and recenter the map by double clicking the mouse. See Map navigation for more details.
Known Values: true | false
Default Value: true
Code Snippet:
dojo.byId("theDoubleClickZoom").value = myMap.isDoubleClickZoom;

<Boolean> isKeyboardNavigation

When true, keyboard navigation is enabled. This allows users to pan the keyboard using the arrow keys and to zoom using the + and - keys. See Map navigation for more details.
Known Values: true | false
Default Value: true
Code Snippet:
dojo.byId("keyboardNavigationStatus").value = myMap.isKeyboardNavigation;

<Boolean> isPan

When true, map panning is enabled using the mouse. See Map navigation for more details.
Known Values: true | false
Default Value: true
Code Snippet:
dojo.byId("panStatus").value = myMap.isPan;
See Also: disablePan  enablePan

<Boolean> isPanArrows

When true, pan arrows are displayed around the edge of the map. See Map navigation for more details.
Known Values: true | false
Default Value: false

<Boolean> isRubberBandZoom

When true, rubberband zoom is enabled. This allows users to draw a bounding box zoom area using the mouse. See Map navigation for more details.
Known Values: true | false
Default Value: true
Code Snippet:
dojo.byId("checkRubberBandZoom").value = myMap.isRubberBandZoom;

<Boolean> isScrollWheelZoom

When true, the mouse scroll wheel zoom is enabled. See Map navigation for more details.
Known Values: true | false
Default Value: true
Code Snippet:
function stopScrollWheelZoom() {
  myMap.disableScrollWheelZoom();
  dojo.byId("stopScrollWheelZoom").value = myMap.isScrollWheelZoom;
}

<Boolean> isShiftDoubleClickZoom

When true, shift double click zoom is enabled. This allows a user to zoom and recenter the map by shift + double clicking the mouse. See Map navigation for more details.
Known Values: true | false
Default Value: true
Code Snippet:
dojo.byId("theShiftDoubleClickZoom").value = myMap.isShiftDoubleClickZoom;

<Boolean> isZoomSlider

When true, the zoom slider is displayed on the map. See Map navigation for more details.
Known Values: true | false
Default Value: true

<String[]> layerIds

Array of current TiledMapServiceLayers and DynamicMapServiceLayers added to the map.
Code Snippet:
function getLayerProperties() {
  for(var j = 0; j < map.layerIds.length; j++) {
    var layer = map.getLayer(map.layerIds[j]);
    alert(layer.id + ' ' + layer.opacity + ' ' + layer.visible);
  }
}

<Boolean> loaded

After the first layer is loaded, the value is set to true.
Known Values: true | false
See Also: onLoad  onUnload

<String> navigationMode

Indicates whether the map uses CSS3 transformations when panning and zooming. In 'css-transform' mode the map will use CSS3 transformations, if supported by the browser, to provide a smoother experience while panning and zooming the map.
Known Values: 'classic' | 'css-transforms'

<Point> position

This point geometry in screen coordinates represent the top-left corner of the map container. This coordinate also acts as the origin for all screen coordinates returned by Map and GraphicsLayer events.

<DOMNode> root

The DOM node that contains the container of layers, build-in info window, logo and slider.

<Boolean> showAttribution

When true, map attribution is enabled.

<SnappingManager> snappingManager

If snapping is enabled on the map using map.enableSnapping() this property provides access to the SnappingManager. The snapping manager's setLayerInfo method can be used to modify the target snapping layers.
Code Snippet:
var snappingManager = map.snappingManager();

<SpatialReference> spatialReference

The spatial reference of the map. See Projected Coordinate Systems and Geographic Coordinate Systems for the list of supported spatial references.

<TimeExtent> timeExtent

The current TimeExtent for the map. Use the setTimeExtent method to modify the time extent.

<Number> width

Current width of the map in screen pixels. This property is read-only. The height and width of the map are normally set in the HTML DIV or other HTML element containing the map container.
Code Snippet:
function getMapWidthHeight() {
  alert("Width = " + myMap.width + "; Height = " + myMap.height);
}  
Method Details

addLayer(layer,index?)

Adds an ESRI Layer to the map.

The return object of Layer was added at v1.4.
Return Value: Layer
Input Parameters:
<Layer> layerRequiredLayer to be added to the map.
<Number> indexOptionalA layer can be added at a specified index in the map. If no index is specified or the index specified is greater than the current number of layers, the layer is automatically appended to the list of layers in the map and the index is normalized. (As of v1.3)
Code Snippet:
var baseMapLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
map.addLayer(baseMapLayer);

addLayers(layers)

Adds multiple layers to a map. The array order corresponds to the layer order in the client side map. The onLayerAddResult event fires for each layer that is added. Once all the layers are added to the map the onLayersAddResult fires.

Input Parameters:
<Layer[]> layersRequiredLayers to be added to the map.
Code Snippet:
 var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
 var statesLayer= new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer");
 map.addLayers([basemap,statesLayer]);

centerAndZoom(mapPoint,levelOrFactor)

Centers and zooms the map.

At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the operation is completed.
Return Value: Deferred
Input Parameters:
<Point> mapPointRequiredCenters the map on the specified x,y location. Starting at version 3.3, the mapPoint can be an array of longitude/latitude pairs. 
<Number> levelOrFactorRequiredWhen using an ArcGISTiledMapServiceLayer, the map is zoomed to the level specified. When using a DynamicMapServiceLayer, the map is zoomed in or out by the specified factor. For example, use 0.5 to zoom in twice as far and 2.0 to zoom out twice as far.
Code Snippet:
map.centerAndZoom(location,12);

centerAt(mapPoint)

Centers the map based on map coordinates as the center point.
At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the map has been re-centered to the given point.
Return Value: Deferred
Input Parameters:
<Point> mapPointRequiredCenters the map on the specified x,y location. Starting at version 3.3 this value can be an array of longitude/latitude pairs. 
Code Snippet:
map.centerAt(evt.mapPoint);

destroy()

Destroys the map instance. After the map is destroyed it is no longer valid however you can re-use the div element of the map to create a new map instance.
Code Snippet:
map.destroy();

disableClickRecenter()

Disallows clicking on a map to center it. See Map navigation for more details.
Code Snippet:
function init() {
  myMap = new esri.Map("mapDiv");
  myMap.disableClickRecenter();
}

disableDoubleClickZoom()

Disallows double clicking on a map to zoom in a level and center the map. See Map navigation for more details.
Code Snippet:
function init() {
  myMap = new esri.Map("mapDiv");
  myMap.disableDoubleClickZoom();
}

disableKeyboardNavigation()

Disallows panning and zooming using the keyboard. See Map navigation for more details.
Code Snippet:
function init() {
  myMap = new esri.Map("mapDiv");
  myMap.disableKeyboardNavigation();
}

disableMapNavigation()

Disallows all map navigation except the slider and pan arrows. See Map navigation for more details.

disablePan()

Disallows panning a map using the mouse. See Map navigation for more details.
Code Snippet:
function noPan() {
  myMap.disablePan();
}
See Also: enablePan  isPan

disableRubberBandZoom()

Disallows zooming in or out on a map using a bounding box. See Map navigation for more details.
Code Snippet:
function noRubberBand() {
  myMap.disableRubberBandZoom();
}

disableScrollWheelZoom()

Disallows zooming in or out on a map using the mouse scroll wheel. See Map navigation for more details.
Code Snippet:
function stopScrollWheelZoom() {
  myMap.disableScrollWheelZoom();
  dojo.byId("stopScrollWheelZoom").value = myMap.isScrollWheelZoom;
}

disableShiftDoubleClickZoom()

Disallows shift double clicking on a map to zoom in a level and center the map. See Map navigation for more details.
Return Value: undefined
Code Snippet:
function init() {
  myMap = new esri.Map("mapDiv");
  myMap.disableShiftDoubleClickZoom();
}

disableSnapping()

Disables snapping on the map.
Code Snippet:
map.disableSnapping();

enableClickRecenter()

Permits users to click on a map to center it. See Map navigation for more details.
Code Snippet:
function okClickRecenter() {
  myMap.enableClickRecenter();
}

enableDoubleClickZoom()

Permits users to double click on a map to zoom in a level and center the map. See Map navigation for more details.
Code Snippet:
function okDoubleClickZoom() {
  myMap.enableDoubleClickZoom();
}

enableKeyboardNavigation()

Permits users to pan and zoom using the keyboard. See Map navigation for more details.
Code Snippet:
function init() {
  myMap = new esri.Map("mapDiv");
  myMap.enableKeyboardNavigation();
}

enableMapNavigation()

Allows all map navigation. See Map navigation for more details.

enablePan()

Permits users to pan a map using the mouse. See Map navigation for more details.
Code Snippet:
function panAgain() {
  myMap.enablePan();
}
See Also: disablePan  isPan

enableRubberBandZoom()

Permits users to zoom in or out on a map using a bounding box. See Map navigation for more details.
Code Snippet:
function allowRubberBand() {
  myMap.enableRubberBandZoom();
}

enableScrollWheelZoom()

Permits users to zoom in or out on a map using the mouse scroll wheel. See Map navigation for more details.
Code Snippet:
function allowScrollWheelZoom() {
  myMap.enableScrollWheelZoom();
}

enableShiftDoubleClickZoom()

Permits users to shift double click on a map to zoom in a level and center the map. See Map navigation for more details.
Code Snippet:
function okShiftDoubleClickZoom() {
  myMap.enableShiftDoubleClickZoom();
}

enableSnapping(snapOptions?)

Enable snapping on the map when working with the Editor, Measurement widget or the Draw and Edit toolbars. If no snapOptions are provided all graphics layers, including feature layers, will be set as snap targets. Call this method after the layers are loaded.
Return Value: SnappingManager
Input Parameters:
<Object> snapOptionsOptional
<Number> tolerance Specify the radius of the snapping circle in pixels. The default value is 15 pixels.
<Object> layerInfos An array of layerInfo objects that define the snapping target layers. All values are optional. If no snapping options are set the default values will be used.
<Layer> layer Reference to a feature or graphics layer that will be a target snapping layer. The default option is to set all feature and graphics layers in the map to be target snapping layers.
<Boolean> snapToPoint Default is true. When true snapping to points will be enabled for layers with point geometry.
<Boolean> snapToVertex Default is true. When true snapping to vertices will be enabled for layers with polyline or polygon geometry.
<Boolean> snapToEdge Default is true. When true snapping to edges will be enabled for layers with polyline or polygon geometry.
<SimpleMarkerSymbol> snapPointSymbol Define a symbol for the snapping location. The default symbol is a simple marker symbol with the following properties: size:15px,color:cyan,style:STYLE_CROSS.
<Boolean> alwaysSnap When true, snapping is always enabled. When false users press the snapKey to enable snapping. The default value is false.
<dojo.key> snapKey When alwaysSnap is set to false use this option to define the key users press to enable snapping. The default values is the CTRL key.
var symbol = new esri.symbol.SimpleMarkerSymbol();
map.enableSnapping({
  snapPointSymbol: symbol,
  tolerance:20,
  snapKey:dojo.keys.ALT
});
Code Snippet:
map.enableSnapping();

getBasemap()

Returns the name of the current basemap. 
Return Value: String 

getInfoWindowAnchor(screenCoords)

Sets an InfoWindow's anchor when calling InfoWindow.show.
Return Value: String
Input Parameters:
<Point> screenCoordsRequiredThe anchor point in screen units.

getLayer(id)

Returns an individual layer of a map.
Return Value: Layer
Input Parameters:
<String> idRequiredID assigned to the layer.
Code Snippet:
//get the layer using the layer id
var incidentLayer = map.getLayer("incidentLayer");
//get the layer using the layer index
var layer = map.getLayer(map.layerIds[j]);

getLayersVisibleAtScale()

Return an array of layers visible at the current scale.
Return Value: Layer[]
Code Snippet:
  var layers = map.getLayersVisibleAtScale(map.getScale());
  dojo.forEach(layers,function(layer){
    console.log(layer.id);
  });

getLevel()

Gets the current level of detail for the map. Valid only with an ArcGISTiledMapService layer.
Return Value: Number

getMaxScale()

Returns the maximum visible scale of the map. You cannot zoom-in beyond this scale. A value of 0 indicates that the map does not have a maximum scale constraint. 
Return Value: Number

getMaxZoom()

Returns the maximum zoom level of the map. You cannot zoom in beyond this value. A value of -1 indicates that the map does not have pre-defined zoom levels.
Return Value: Number

getMinScale()

Returns the minimum visible scale of the map. You cannot zoom out beyond this scale. A value of 0 indicates that the map does not have a maximum scale constraint. 
Return Value: Number

getMinZoom()

Returns the minimum zoom level of the map.You cannot zoom out beyond this value.  A value of -1 indicates that the map does not have pre-defined zoom levels. 
Return Value: Number

getScale()

Returns the current map scale.
Return Value: Number
Code Snippet:
var currentScale = map.getScale();
console.log('Scale: ' + currentScale);

getZoom()

Returns the current zoom level of the map. A value of -1 indicates that the map does not have pre-defined zoom levels.
Return Value: Number

hidePanArrows()

Hides the pan arrows from the map. See Map navigation for more details.

hideZoomSlider()

Hides the zoom slider from the map. See Map navigation for more details.

panDown()

Pans the map south. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.
Return Value: Deferred
Code Snippet:
function south() {
  myMap.panDown();
}

panLeft()

Pans the map west. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.
Return Value: Deferred
Code Snippet:
function west() {
  myMap.panLeft();
}

panLowerLeft()

Pans the map southwest. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.
Return Value: Deferred
Code Snippet:
function southWest() {
  myMap.panLowerLeft();
}

panLowerRight()

Pans the map southeast. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.
Return Value: Deferred
Code Snippet:
function southEast() {
  map.panLowerRight();
}

panRight()

Pans the map east. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.
Return Value: Deferred
Code Snippet:
function east() {
  map.panRight();
}

panUp()

Pans the map north. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.
Return Value: Deferred
Code Snippet:
function north() {
  map.panUp();
}

panUpperLeft()

Pans the map northwest. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.
Return Value: Deferred
Code Snippet:
function northWest() {
  myMap.panUpperLeft();
}

panUpperRight()

Pans the map northeast. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.
Return Value: Deferred
Code Snippet:
function northEast() {
  map.panUpperRight();
}

removeAllLayers()

Removes all layers from the map.

The map's extent, spatial reference, and tiling scheme if defined do not change when the layers are removed. When the next layer is added to the map, this layer is displayed at the same extent and spatial reference.

removeLayer(layer)

Removes the specified layer from the map.
Input Parameters:
<Layer> layerRequiredLayer to be removed from the map.

The map's extent, spatial reference, and tiling scheme if defined do not change when the layer is removed. When the next layer is added to the map, this layer is displayed at the same extent and spatial reference.
See Also: onLayerRemove

reorderLayer(layer,index)

Changes the layer order in the map. Note that the first layer added is always the base layer, even if its order is changed.
Input Parameters:
<Layer> layerRequiredThe layer to be moved. (As of v1.4) Beginning with version 1.4, use this parameter in place of "layerId".

In versions prior to v1.4, use "layerID" in place of "layer".
Type: <String>
Definition: The ID of the layer to be moved. This ID is assigned in Layer.id.
<Number> indexRequiredRefers to the location for placing the layer. The bottom most layer has an index of 0.
Code Snippet:
map.addLayer(cityLayer);
map.reorderLayer(cityLayer,1);
See Also: onLayerReorder

reposition()

Repositions the map DIV on the page. This method should be used after the map DIV has been repostioned.

resize(immediate?)

Resizes the map DIV. This method should be used after the map DIV has been resized.
Input Parameters:
<Boolean> immediateOptionalBy default, the actual resize logic is delayed internally in order to throttle spurious resize events dispatched by some browsers. In cases where you explicitly call this method in a one-and-done situation, you can use the boolean immediate argument to indicate that the resize logic should be applied immediately without any delay.
Code Snippet:
var resizeTimer;
dojo.connect(map, 'onLoad', function(theMap) {
  dojo.connect(dijit.byId('map'), 'resize', function() {  //resize the map if the div is resized
    clearTimeout(resizeTimer);
    resizeTimer = setTimeout( function() {
      map.resize();
      map.reposition();
    }, 500);
  });
});
See Also: onResize

setBasemap(basemap)

Change the map's current basemap. 
Input Parameters:
<String> basemapRequiredA valid basemap name. Valid values are: "streets" , "satellite" , "hybrid", "topo", "gray", "oceans", "national-geographic", "osm". 

setExtent(extent,fit?)

Sets the extent of the map. The extent must be in the same spatial reference as the map.
At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the extent change has been committed by the map.
Return Value: Deferred.
Input Parameters:
<Extent> extentRequiredSets the minx, miny, maxx, and maxy for a map.
<Boolean> fitOptionalWhen true, for maps that contain tiled map service layers, you are guaranteed to have the input extent shown completely on the map. (As of v1.3)
Code Snippet:
var taxLotExtent = selectedTaxLot.geometry.getExtent();
map.setExtent(taxLotExtent);

setLevel(level)

Sets the map to the specified level. Zooms to the new level based on the current map center point. Valid only with an ArcGISTiledMapService layer.

At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the zoom level has been changed.
Return Value: Deferred
Input Parameters:
<Number> levelRequiredThe level ID.
Code Snippet:
map.setLevel(10);

setMapCursor(cursor)

Sets the default cursor for the map. This cursor is shown whenever the mouse is pointed over the map, except when panning by dragging the map or using SHIFT+Drag to zoom. If not set, the map uses the platform-dependent default cursor, usually an arrow.
Input Parameters:
<String> cursorRequiredA standard CSS cursor value. Some common values include "default", "pointer", "crosshair", "text", "help", and "wait".
Code Snippet:
map.setMapCursor("wait");
When using a url for the cursor, Firefox requires an additional, non-URL value.
map.setMapCursor("url(custom.cur),auto");

setScale(scale)

Sets the map scale to the specified value. The value must be greater than 0.

At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the map scale has been changed.
Return Value: Deferred
Input Parameters:
<Number> scaleRequiredA map scale value greater than 0. 

setTimeExtent(timeExtent)

Sets the TimeExtent for the map. When the time extent is changed the onTimeExtentChange event fires. Time aware layers listen for this event and update to only display content for the current time extent.
Input Parameters:
<TimeExtent> timeExtentRequiredSet the time extent for which data is displayed on the map.
Code Snippet:
var timeExtent = new esri.TimeExtent();
timeExtent.startTime = new Date("1/1/1989 UTC");
map.setTimeExtent(timeExtent);

setTimeSlider(timeSlider)

Set the time slider associated with the map.
Input Parameters:
<TimeSlider> timeSliderRequiredThe time slider dijit to associate with the map.
Code Snippet:
map.setTimeSlider(timeSlider);

setZoom(zoom)

Set the map zoom level to the given value. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the zoom level has been changed.
Return Value: Deferred
Input Parameters:
<Number> zoomRequiredA valid zoom level value. 

showPanArrows()

Shows the pan arrows on the map. See Map navigation for more details.

showZoomSlider()

Shows the zoom slider on the map. See Map navigation for more details.

toMap(screenPoint)

Converts a single screen point or an array of screen points to map coordinates.
Return Value: Point
Input Parameters:
<ScreenPoint | Point> screenPointRequiredConverts screen coordinates to map coordinates. Starting at version 3.3, screenPoint should be an instance of ScreenPoint. 

toScreen(mapPoint)

Converts a single map point or an array of map points to screen coordinates.
Return Value: Point
Input Parameters:
<Point> mapPointRequiredConverts map coordinates to screen coordinates. 
Code Snippet:
var screenPoint = map.toScreen(feature.geometry.getExtent().getCenter());
Event Details

[ On Style Events | Connect Style Events ]

basemap-change

Fired when the map's basemap is changed. Should be used in favor of onBaseChange

click

Fires when a user single clicks on the map using the mouse and the mouse pointer is within the map region of the HTML page. Should be used in favor of onClick
Event Properties:
<MouseEvent> <MouseEvent>A standard DOM MouseEvent with additional properties such as mapPoint and screenPoint

dbl-click

Fires when a user double clicks on the map using the mouse and the mouse pointer is within the map region of the HTML page. Should be used in favor of onDblClick
Event Properties:
<MouseEvent> <MouseEvent>A standard DOM MouseEvent with additional properties such as mapPoint and screenPoint

extent-change

Fires when the extent of the map has changed. Should be used in favor of onExtentChange
Event Properties:
<Extent> extentGets the extent when after the extent has changed.
<Point> deltaThe change in the x and y values from the previous extent. The Point x and y values are in screen units. This point acts as an anchor point, and this part of the map stays within the map region during the zoom process.
<Boolean> levelChangeWhen using ArcGIS Server tiled map services, the value is "true" when the user zooms to a new level. The value remains "false" during pan operations.
<LOD> lodWhen using ArcGIS Server tiled map services, this argument returns characteristics about the level of detail.

key-down

Fires when a keyboard key is pressed. Should be used in favor of onKeyDown
Event Properties:
<KeyboardEvent> <KeyboardEvent>A standard DOM KeyboardEvent

key-up

Fires when a keyboard key is released. Should be used in favor of onKeyUp
Event Properties:
<KeyboardEvent> <KeyboardEvent>A standard DOM KeyboardEvent

layer-add

Fires any time a layer is added to the map. Should be used in favor of onLayerAdd
Event Properties:
<Layer> layerThe layer added to the map.

layer-add-result

Fires after specified layer has been added to the map. Should be used in favor of onLayerAddResult
Event Properties:
<Layer> layerThe layer that was added to the Map
<Error> errorAn optional parameter. The value of this parameter will a standard JavaScript Error object if an error occurred or null if the layer was added successfully.

layer-remove

Fires after the layer has been removed. Should be used in favor of onLayerRemove
Event Properties:
<Layer> layerThe removed layer.

layer-reorder

Fires when the map layer order has been changed. Should be used in favor of onLayerReorder
Event Properties:
<Layer> layerThe reordered layer.
<Number> indexThe index of the reordered layer.
See Also: layer

layer-resume

Fires when a map layer resumes drawing. Should be used in favor of onLayerResume
Event Properties:
<Layer> layerThe layer that has resumed drawing.

layers-add-result

Fires after all layers are added to the map using the map.addLayers method. Should be used in favor of onLayersAddResult.
Event Properties:
<Layer[]> layersAn array of layers added to the map.

layers-removed

Fires after all the layers have been removed. Should be used in favor of onLayersRemoved

layers-reordered

Fires when all the layers have been reordered. Should be used in favor of onLayersReordered
Event Properties:
<Number[]> layerIdsGets the extent during the zoom event.

load

Fires when the first or base layer has been successfully added to the map. Should be used in favor of onLoad
Event Properties:
<Map> mapSpecifies the map to load.

mouse-down

Fires when a mouse button is pressed down and the mouse cursor is in the map region of the HTML page. Should be used in favor of onMouseDown
Event Properties:
<MouseEvent> <MouseEvent>A standard DOM MouseEvent with additional properties such as mapPoint and screenPoint

mouse-drag

Fires while the mouse is being dragged until the mouse button is released. Should be used in favor of onMouseDrag
Event Properties:
<MouseEvent> <MouseEvent>A standard DOM MouseEvent with additional properties such as mapPoint and screenPoint

mouse-drag-end

Fires when a mouse button is released and the user stops dragging the mouse. Should be used in favor of onMouseDragEnd
Event Properties:
<MouseEvent> <MouseEvent>A standard DOM MouseEvent with additional properties such as mapPoint and screenPoint

mouse-drag-start

Fires when a mouse button is pressed down and the user starts to drag the mouse. Should be used in favor of onMouseDragStart
Event Properties:
<MouseEvent> <MouseEvent>A standard DOM MouseEvent with additional properties such as mapPoint and screenPoint

mouse-move

Fires any time the mouse pointer moves over the map region. A common use for this event is to show the current x,y coordinate of the map as the user moves the mouse pointer. Should be used in favor of onMouseMove
Event Properties:
<MouseEvent> <MouseEvent>A standard DOM MouseEvent with additional properties such as mapPoint and screenPoint

mouse-out

Fires when the mouse moves out of the map region of the HTML page. Should be used in favor of onMouseOut
Event Properties:
<MouseEvent> <MouseEvent>A standard DOM MouseEvent with additional properties such as mapPoint and screenPoint

mouse-over

Fires when the mouse moves into the map region of the HTML page.. Should be used in favor of onMouseOver
Event Properties:
<MouseEvent> <MouseEvent>A standard DOM MouseEvent with additional properties such as mapPoint and screenPoint

mouse-up

Fires when the mouse button is released and the mouse pointer is within the map region of the HTML page. Should be used in favor of onMouseUp
Event Properties:
<MouseEvent> <MouseEvent>A standard DOM MouseEvent with additional properties such as mapPoint and screenPoint

mouse-wheel

Fires when the mouse wheel is scrolled. Should be used in favor of onMouseWheel
Event Properties:
<MouseEvent> <MouseEvent>A standard DOM MouseEvent with additional properties such as mapPoint and screenPoint

pan

Fires during the pan process. Should be used in favor of onPan
Event Properties:
<Extent> extentThe current extent of the map as the map is panning.
<Point> deltaThe change in x,y values in screen units as the map is panning.

pan-end

Fires when the pan is complete. Should be used in favor of onPanEnd
Event Properties:
<Point> deltaThe change in x,y values in screen units from the starting screen point once the map is finished panning.
<Extent> extentThe current extent of the map when panning ends.

pan-start

Fires when a user commences panning. Should be used in favor of onPanStart
Event Properties:
<Extent> extentThe current extent of the map as the map is panning.

reposition

Fires when the map DIV is repositioned. Should be used in favor of onReposition
Event Properties:
<Number> xX-coordinate in screen units.
<Number> yY-coordinate in screen units.

resize

Fires when the map's container has been resized. Should be used in favor of onResize
Event Properties:
<Extent> extentThe extent of the map.
<Number> widthThe width of the map in pixels.
<Number> heightThe height of the map in pixels.
See Also: onResize

time-extent-change

Fires when the map's timeExtent property is set. Should be used in favor of onTimeExtentChange
Event Properties:
<TimeExtent> timeExtentFires when the map's timeExtent property is changed. Time aware layers listen for this event and update to only display content for the map's specified time extent.

unload

Fires when the page is refreshed. Should be used in favor of onUnload
Event Properties:
<Map> mapSpecified the map to unload.

update-end

Fires after layers that are updating their content have completed. This event is often used in combination with onUpdateStart to display a 'Map is busy' or 'Loading...' message as visual feedback to the end-user.. Should be used in favor of onUpdateEnd
Event Properties:
<Error> errorAn optional parameter whose value will be a JavaScript Error object if an error occurred.

update-start

Fires when one or more layers being updating their content. This event is often used in combination with onUpdateEnd to display a 'Map is busy' or 'Loading...' message as visual feedback to the end-user. Should be used in favor of onUpdateStart

zoom

Fires during the zoom process. Should be used in favor of onZoom
Event Properties:
<Extent> extentGets the extent during the zoom event.
<Number> zoomFactorThe scale factor represents the amount as a percentage that the map zoomed in or out from the previous extent. A value of 2 means the map was zoomed in twice as far as the previous extent. A value of 0.5 means the map zoomed out twice as far as previously.
<Point> anchorThe location of the mouse pointer. The Point x and y values are in screen units. This point acts as an anchor point, and this part of the map stays within the map region during the zoom process.

zoom-end

Fires when the zoom is complete. Should be used in favor of onZoomEnd
Event Properties:
<Extent> extentGets the extent when the zoom event ends.
<Number> zoomFactorThe scale factor represents the amount as a percentage that the map zoomed in or out from the previous extent. A value of 2 means the map was zoomed in twice as far as the previous extent. A value of 0.5 means the map zoomed out twice as far as previously.
<Point> anchorThe location of the mouse pointer. The Point x and y values are in screen units. This point acts as an anchor point, and this part of the map stays within the map region during the zoom process.
<Number> levelLevel of an ArcGISTiledMapServiceLayer after zoom is complete.

zoom-start

Fires when a user commences zooming. Should be used in favor of onZoomStart
Event Properties:
<Extent> extentGets the extent when the zoom event starts.
<Number> zoomFactorThe scale factor represents the amount as a percentage that the map zoomed in or out from the previous extent. A value of 2 means the map was zoomed in twice as far as the previous extent. A value of 0.5 means the map zoomed out twice as far as previously.
<Point> anchorThe location of the mouse pointer. The Point x and y values are in screen units. This point acts as an anchor point, and this part of the map stays within the map region during the zoom process.
<Number> levelLevel of an ArcGISTiledMapServiceLayer before the zoom commences.