Release notes for 4.0
What's New since 3.x
Lots! 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.
What's New since 4.0 beta 3
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.geometry
object type property was inconsistent with thegeometryType
property 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-symbol
, picture-marker-symbol
, and simple-line-symbol
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
ArcGISDynamicLayer
is now called MapImageLayerArcGISElevationLayer
is now called ElevationLayerArcGISImageLayer
is now called ImageryLayerArcGISTiledLayer
is now called TileLayerWebTiledLayer
is now called WebTileLayer - take note of the removed 'd'.Renamed
InitialState
class toInitialViewProperties
, accessible from esri/webscene/InitialViewProperties or esri/webmap/InitialViewPropertiesRemoved
DynamicLayer
class
Properties, methods, and events that were renamed, or removed
Basemap
- esri/Basemap
- Removed
elevationLayers
,initialExtent
,spatialReference
, andvisible
properties
- Removed
Color
- esri/Color
- Renamed
toJson()
totoJSON()
- Renamed
Map
- esri/Map
- Removed
initialExtent
,loaded
,loadError
,loadStatus
andspatialReference
properties - Removed
always()
,cancelLoad()
,getLayer()
,isFulfilled()
,isRejected()
,isResolved()
,load()
,otherwise()
, andthen()
methods - Removed
layer-add
,layer-remove
, andlayer-reorder
events.
- Removed
Instead, see the Collection change event to listen for when items get added, moved or removed.
PopupTemplate
- esri/PopupTemplate
- Removed
showAttachments
property
- Removed
Request
- esri/request
- Removed
setRequestPreCallback()
method
- Removed
WebScene
- esri/WebScene
- Removed
initialExtent
andinitialState
properties - Removed
getLayer()
method - Removed
layer-add
,layer-remove
, andlayer-reorder
events
- Removed
- esri/webscene/Lighting
- Renamed the
ambientOcclusion
property toambientOcclusionEnabled
- Renamed the
directShadows
property 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-create
event tolayerview-create
andlayer-view-destroy
event tolayerview-destroy
- Renamed
- esri/layers/GraphicsLayer
- Removed
clear
method
- 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-search
is now search-clearsearch-results
is now search-completesuggest-results
is now suggest-complete
- Property name changes:
searchingAllEnabled
is now searchAllEnabledsearch-results
is now resultssuggest-results
is now suggestionsvalue
is now searchTerm
- Event name changes:
- esri/widgets/Popup
action-select
event was renamed to trigger-action.selectAction()
method was renamed to triggerAction.
- esri/layers/support/ImageParameters
- Removed
dpi
,extent
,format
,height
,imageSpatialReference
,layerIds
,layerOption
,transparent
, andwidth
properties
- Removed
Renderers
- esri/renderers/ClassBreaksRenderer
- Renamed the
attributeField
property tofield
- Renamed the
infos
property 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
attributeField
property tofield
- Renamed the
attributeField2
property tofield2
- Renamed the
attributeField3
property tofield3
- Renamed the
infos
property touniqueValueInfos
- Renamed the
addValue()
method toaddUniqueValueInfo()
- Renamed the
removeValue()
method toremoveUniqueValueInfo()
- Renamed
colorInfo,
opacityInfo
, andsizeInfo
visual variable types tocolor
,opacity
, andsize
.
- Renamed the
Symbols
- esri/symbols/PictureMarkerSymbol
- Removed
size
property. Useheight
andwidth
properties instead.
- Removed
Tasks
- esri/tasks/support/DirectionsFeatureSet
- Removed
fieldAliases
property
- Removed
- esri/tasks/support/FeaturSet
- Removed
fieldAliases
property
- Removed
- esri/tasks/support/IdentityParameters
- Removed
dynamicLayerInfos
property
- Removed
Views
- esri/view/View, esri/views/MapView and esri/view/SceneView
- Removed
heightResizeMode
andwidthResizeMode
properties. UseheightBreakPoint
andwidthBreakpoint
properties instead. - Renamed
animateTo()
togoTo()
. - Removed
createViewPoint()
, andgetLayerView()
methods - Renamed the
layer-view-create
event tolayerview-create
- Renamed the
layer-view-destroy
event tolayerview-destroy
- Removed
Widgets
esri/widgets/Popup
- Renamed the
selectAction()
method totriggerAction
- Renamed the
action-select
event totrigger-action
- Renamed the
esri/widgets/Search
- Renamed the
searchingAllEnabled
property tosearchAllEnabled
- Renamed the
search-results
property toresults
- Renamed the
suggest-results
property tosuggestions
- Renamed the
value
property tosearchTerm
- Renamed the
clear-search
event tosearch-clear
- Renamed the
search-results
event tosearch-complete
- Renamed the
suggest-results
event to tosuggest-complete
- Renamed the
esri/widgets/Attribution/AttributionViewModel
- Removed
items
andmaxWidth
properties
- Removed
esri/widgets/BaseMapToggle/BasemapToggleViewModel
- Renamed
currentBasemap
toactiveBasemap
. - Renamed
secondaryBasemap
tonextBasemap
. - Removed
items
,maxWidth
andbasemaps
properties
- 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
goToLocationEnabled
andgraphic
properties - Removed
clearOnTrackingStopEnabled
,graphicsLayer
,locationSymbol
,locationSymbolEnabled
,popupTemplate
,scale
,tracking
,trackingEnabled
,updateLocationEnabled
, andupdateScaleEnabled
properties - Removed
clear()
method
- Added
esri/widgets/Popup/PopupViewModel
- Removed
alignmentPositions
,autoRepositionEnabled
,closestFirst
,docked
,dockOptions
,dockPositions
,paginationEnabled
,selectedIndex
,updateLocationEnabled
,visible
,waitingForResult
,zoomFactor
, andzoomScale
properties - Removed
animateToCurrentLocation()
,selectAction()
, andzoomToCurrentLocation()
methods - Renamed the
selectAction()
method totriggerAction
- Renamed the
action-select
event totrigger-action
- Removed
esri/widgets/Search/SearchViewModel
- Renamed the
searchingAllEnabled
property tosearchAllEnabled
- Renamed the
search-results
property toresults
- Renamed the
suggest-results
property tosuggestions
- Renamed the
value
property tosearchTerm
- Renamed the
clear-search
event tosearch-clear
- Renamed the
search-results
event tosearch-complete
- Renamed the
suggest-results
event to tosuggest-complete
- Removed
autoNavigate
,buttonModeEnabled
,expanded
,graphicsLayer
,highlightEnabled
,highlightGraphic
,labelEnabled
,labelGraphic
,labelSymbol
,locationToAddressDistance
,maxLength
,minCharacters
,popup
,showPopupOnSelect
,sourcesMenuEnabled
,suggestionsMenuEnabled
, andzoomScale
properties - Removed
cancelActiveSuggest()
,delayedSuggest()
, andselect()
methods
- Renamed the