Version 4 of the ArcGIS API for JavaScript is a brand new API enabling you to visualize your data in 2D or 3D, easily integrate with your Web GIS, and build a great user experience; all using a simple and consistent API. See the Guide overview for more information, as well as the migration topics.
Autocasting
Autocasting is a convenient way to set typed properties without bringing in extra API modules via the require() function. For further detail regarding this, please refer to the Autocasting guide topic.
Support for reading WebMaps
Reading WebMaps is partially supported. This means it relies on capabilities already available in the API. For example, it is possible to read WebMaps if they contain layer types that are not yet implemented (e.g. WMS layers). In these instances, only layer types supported by the API will display. For additional information on this, please refer to the WebMap documentation.
Improved FeatureLayer
The FeatureLayer has had significant improvements made to it. For example:
- Features within a FeatureLayer are rendered as graphics inside a LayerView. To access features visible in the view, use the query methods in the FeatureLayerView.
- It is now possible to create a FeatureLayer from an existing PortalItem. For a working sample, please refer to the Create a layer from a PortalItem sample
- It is now possible to create a FeatureLayer from an array of client-side graphics. For a working sample, please refer to the Create a FeatureLayer with an array of graphics sample
- Performance has been improved as drawing is automatically managed by the API
- It is now possible to filter features on the client, via the definitionExpression
Widget improvements
- Simplified getting, setting, and watching widgets to be more simplistic and consistent
- Combined Attribution and logo widgets into new Attribution widget
- Divided the Locate widget into updated Locate widget and new Track widget
Improved PopupTemplate
It is now possible to work with multiple popup elements within the PopupTemplate. You can choose from four types: text, fields, media (such as charts and images), and attachments. These elements can be added individually or combined. More information on working with these various elements can be found in the API reference specific for PopupTemplate.content.
New Widgets
Some new widgets have been added to the API, these include:
- NavigationToggle widget - provides two simple buttons that toggle a SceneView's navigation mode
- Legend widget - supports working with a FeatureLayer and/or StreamLayer
- Track widget - provides geolocation functionality which accesses the geographic location of the tracking device and displays it on the View. An example of this can be seen using the Track widget simulation sample.
SDK improvements
The SDK has been updated by adding:
- More samples and getting started tutorials
- Improved experience for navigating the API reference
- More guide topics, some of these include
- A Styling topic which discusses how to gain full control of styling widgets.
- A topic that discusses working with the View UI.
Bug fixes
- BUG-000093402: JavaScript 4.0 beta3 fails to process the request with proxy with SceneView
- BUG-000092521: Unable to draw a SimpleFillSymbol when using SceneView with graphics
- NIM085930: Fixed an issue where the
esri.geometryobject type property was inconsistent with thegeometryTypeproperty expected by feature collection
API Updates
The following provides a comprehensive overview of the changes in the API. This includes an all-inclusive list of updates made to the API between 4.0 beta 3 and final. This list is comprised of classes and objects that were added or renamed. In addition to properties, methods, and events that were added, renamed, or removed.
The view container
In beta 3, the view container did not require height and width to be set. At 4.0, height and width are required.
Renamed constant string values
Known string values for constants have all been converted to kebab-case for consistency throughout the API. For example, Symbol.type has many possible type values. Prior to 4.0 final, these values read similar to of these being, simplemarkersymbol, picturemarkersymbol, simplelinesymbol to name a few. These values are now simple-marker, picture-marker, and simple-line
dgrid and dstore upgrade
Version 4.0 of the ArcGIS API for JavaScript uses Dojo 1.10.4, dgrid version 1.0.0, and dstore version 1.1.1.
Classes/Objects that were renamed
ArcGISDynamicLayeris now called MapImageLayerArcGISElevationLayeris now called ElevationLayerArcGISImageLayeris now called ImageryLayerArcGISTiledLayeris now called TileLayerWebTiledLayeris now called WebTileLayer - take note of the removed 'd'.Renamed
InitialStateclass toInitialViewProperties, accessible from esri/webscene/InitialViewProperties or esri/webmap/InitialViewPropertiesRemoved
DynamicLayerclass
Properties, methods, and events that were renamed, or removed
Basemap
- esri/Basemap
- Removed
elevationLayers,initialExtent,spatialReference, andvisibleproperties
- Removed
Color
- esri/Color
- Renamed
toJson()totoJSON()
- Renamed
Map
- esri/Map
- Removed
initialExtent,loaded,loadError,loadStatusandspatialReferenceproperties - Removed
always(),cancelLoad(),getLayer(),isFulfilled(),isRejected(),isResolved(),load(),otherwise(), andthen()methods - Removed
layer-add,layer-remove, andlayer-reorderevents.
- Removed
Instead, see the Collection change event to listen for when items get added, moved or removed.
PopupTemplate
- esri/PopupTemplate
- Removed
showAttachmentsproperty
- Removed
Request
- esri/request
- Removed
setRequestPreCallback()method
- Removed
WebScene
- esri/WebScene
- Removed
initialExtentandinitialStateproperties - Removed
getLayer()method - Removed
layer-add,layer-remove, andlayer-reorderevents
- Removed
- esri/webscene/Lighting
- Renamed the
ambientOcclusionproperty toambientOcclusionEnabled - Renamed the
directShadowsproperty todirectShadowsEnabled
- Renamed the
Instead, see the Collection change event to listen for when items get added, moved or removed.
- esri/core/Collection
- Removed
addItem(),addItems(),clear,getAll(),moveItem(),removeItem(),removeItemAt(), andremoveItems()methods
- Removed
Geometry
- esri/geometry/Extent
- Removed
normalize()andshiftCentralMeridian()methods
- Removed
- esri/geometry/Point
- Removed
normalize()andoffset()methods
- Removed
- esri/geometry/SpatialReference
- Removed
isWebMercator()method
- Removed
Layers
- esri/layers/Layer
- Renamed
layer-view-createevent tolayerview-createandlayer-view-destroyevent tolayerview-destroy
- Renamed
- esri/layers/GraphicsLayer
- Removed
clearmethod
- Removed
- esri/layers/GroupLayer
- Removed
getLayer()method
- Removed
- esri/layers/SceneLayer
- Removed
add(),clear(), andremove()methods
- Removed
- esri/layers/VectorTileLayer
- Renamed
setStyle()method toloadStyle()
- Renamed
- esri/widgets/Search
- Event name changes:
clear-searchis now search-clearsearch-resultsis now search-completesuggest-resultsis now suggest-complete
- Property name changes:
searchingAllEnabledis now searchAllEnabledsearch-resultsis now resultssuggest-resultsis now suggestionsvalueis now searchTerm
- Event name changes:
- esri/widgets/Popup
action-selectevent was renamed to trigger-action.selectAction()method was renamed to triggerAction.
- esri/layers/support/ImageParameters
- Removed
dpi,extent,format,height,imageSpatialReference,layerIds,layerOption,transparent, andwidthproperties
- Removed
Renderers
- esri/renderers/ClassBreaksRenderer
- Renamed the
attributeFieldproperty tofield - Renamed the
infosproperty toclassBreakInfos - Renamed the
addBreak()method toaddClassBreakInfo() - Renamed the
getBreakInfo()method togetClassBreakInfo() - Renamed the
removeBreak()method toremoveClassBreakInfo() - Removed
getBreakIndex(),getColor(),getOpacity(),getSize(),getSymbol(),getVisualVariablesForType(), andhasVisualVariables()methods
- Renamed the
- esri/renderers/UniqueValueRenderer
- Renamed the
attributeFieldproperty tofield - Renamed the
attributeField2property tofield2 - Renamed the
attributeField3property tofield3 - Renamed the
infosproperty touniqueValueInfos - Renamed the
addValue()method toaddUniqueValueInfo() - Renamed the
removeValue()method toremoveUniqueValueInfo() - Renamed
colorInfo,opacityInfo, andsizeInfovisual variable types tocolor,opacity, andsize.
- Renamed the
Symbols
- esri/symbols/PictureMarkerSymbol
- Removed
sizeproperty. Useheightandwidthproperties instead.
- Removed
Tasks
- esri/tasks/support/DirectionsFeatureSet
- Removed
fieldAliasesproperty
- Removed
- esri/tasks/support/FeaturSet
- Removed
fieldAliasesproperty
- Removed
- esri/tasks/support/IdentityParameters
- Removed
dynamicLayerInfosproperty
- Removed
Views
- esri/view/View, esri/views/MapView and esri/view/SceneView
- Removed
heightResizeModeandwidthResizeModeproperties. UseheightBreakPointandwidthBreakpointproperties instead. - Renamed
animateTo()togoTo(). - Removed
createViewPoint(), andgetLayerView()methods - Renamed the
layer-view-createevent tolayerview-create - Renamed the
layer-view-destroyevent tolayerview-destroy
- Removed
Widgets
esri/widgets/Popup
- Renamed the
selectAction()method totriggerAction - Renamed the
action-selectevent totrigger-action
- Renamed the
esri/widgets/Search
- Renamed the
searchingAllEnabledproperty tosearchAllEnabled - Renamed the
search-resultsproperty toresults - Renamed the
suggest-resultsproperty tosuggestions - Renamed the
valueproperty tosearchTerm - Renamed the
clear-searchevent tosearch-clear - Renamed the
search-resultsevent tosearch-complete - Renamed the
suggest-resultsevent to tosuggest-complete
- Renamed the
esri/widgets/Attribution/AttributionViewModel
- Removed
itemsandmaxWidthproperties
- Removed
esri/widgets/BaseMapToggle/BasemapToggleViewModel
- Renamed
currentBasemaptoactiveBasemap. - Renamed
secondaryBasemaptonextBasemap. - Removed
items,maxWidthandbasemapsproperties
- Renamed
esri/widgets/Compas/CompassViewModel
- Renamed the
resetDirection()method toreset()
- Renamed the
esri/widgets/Home/HomeViewModel
- Renamed the
goHome()method togo()
- Renamed the
esri/widgets/Locate/LocateViewModel
- Added
goToLocationEnabledandgraphicproperties - Removed
clearOnTrackingStopEnabled,graphicsLayer,locationSymbol,locationSymbolEnabled,popupTemplate,scale,tracking,trackingEnabled,updateLocationEnabled, andupdateScaleEnabledproperties - Removed
clear()method
- Added
esri/widgets/Popup/PopupViewModel
- Removed
alignmentPositions,autoRepositionEnabled,closestFirst,docked,dockOptions,dockPositions,paginationEnabled,selectedIndex,updateLocationEnabled,visible,waitingForResult,zoomFactor, andzoomScaleproperties - Removed
animateToCurrentLocation(),selectAction(), andzoomToCurrentLocation()methods - Renamed the
selectAction()method totriggerAction - Renamed the
action-selectevent totrigger-action
- Removed
esri/widgets/Search/SearchViewModel
- Renamed the
searchingAllEnabledproperty tosearchAllEnabled - Renamed the
search-resultsproperty toresults - Renamed the
suggest-resultsproperty tosuggestions - Renamed the
valueproperty tosearchTerm - Renamed the
clear-searchevent tosearch-clear - Renamed the
search-resultsevent tosearch-complete - Renamed the
suggest-resultsevent to tosuggest-complete - Removed
autoNavigate,buttonModeEnabled,expanded,graphicsLayer,highlightEnabled,highlightGraphic,labelEnabled,labelGraphic,labelSymbol,locationToAddressDistance,maxLength,minCharacters,popup,showPopupOnSelect,sourcesMenuEnabled,suggestionsMenuEnabled, andzoomScaleproperties - Removed
cancelActiveSuggest(),delayedSuggest(), andselect()methods
- Renamed the



