Release notes for 4.0

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.

May 2016

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.

Switching webmaps sample

Improved FeatureLayer

The FeatureLayer has had significant improvements made to it. For example:

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.

Multiple popup elements sample

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

Legend widget sample

  • 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.

Track widget sample

SDK improvements

The SDK has been updated by adding:

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 the geometryType 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, 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

Properties, methods, and events that were renamed, or removed

Basemap

  • esri/Basemap
    • Removed elevationLayers, initialExtent, spatialReference, and visible properties

Color

  • esri/Color
    • Renamed toJson() to toJSON()

Map

  • esri/Map
    • Removed initialExtent, loaded, loadError, loadStatus and spatialReference properties
    • Removed always(), cancelLoad(), getLayer(), isFulfilled(), isRejected(), isResolved(), load(), otherwise(), and then() methods
    • Removed layer-add, layer-remove, and layer-reorder events.

Instead, see the Collection change event to listen for when items get added, moved or removed.

PopupTemplate

  • esri/PopupTemplate
    • Removed showAttachments property

Request

  • esri/request
    • Removed setRequestPreCallback() method

WebScene

  • esri/WebScene
    • Removed initialExtent and initialState properties
    • Removed getLayer() method
    • Removed layer-add, layer-remove, and layer-reorder events
  • esri/webscene/Lighting
    • Renamed the ambientOcclusion property to ambientOcclusionEnabled
    • Renamed the directShadows property to directShadowsEnabled

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(), and removeItems() methods

Geometry

  • esri/geometry/Extent
    • Removed normalize() and shiftCentralMeridian() methods
  • esri/geometry/Point
    • Removed normalize() and offset() methods
  • esri/geometry/SpatialReference
    • Removed isWebMercator() method

Layers

  • esri/layers/Layer
    • Renamed layer-view-create event to layerview-create and layer-view-destroy event to layerview-destroy
  • esri/layers/GraphicsLayer
    • Removed clear method
  • esri/layers/GroupLayer
    • Removed getLayer() method
  • esri/layers/SceneLayer
    • Removed add(), clear(), and remove() methods
  • esri/layers/VectorTileLayer
    • Renamed setStyle() method to loadStyle()
  • esri/widgets/Search
  • esri/widgets/Popup
  • esri/layers/support/ImageParameters
    • Removed dpi, extent, format, height, imageSpatialReference, layerIds, layerOption, transparent, and width properties

Renderers

  • esri/renderers/ClassBreaksRenderer
    • Renamed the attributeField property to field
    • Renamed the infos property to classBreakInfos
    • Renamed the addBreak() method to addClassBreakInfo()
    • Renamed the getBreakInfo() method to getClassBreakInfo()
    • Renamed the removeBreak() method to removeClassBreakInfo()
    • Removed getBreakIndex(), getColor(), getOpacity(), getSize(), getSymbol(), getVisualVariablesForType(), and hasVisualVariables() methods
  • esri/renderers/UniqueValueRenderer
    • Renamed the attributeField property to field
    • Renamed the attributeField2 property to field2
    • Renamed the attributeField3 property to field3
    • Renamed the infos property to uniqueValueInfos
    • Renamed the addValue() method to addUniqueValueInfo()
    • Renamed the removeValue() method to removeUniqueValueInfo()
    • Renamed colorInfo, opacityInfo, and sizeInfo visual variable types to color, opacity, and size.

Symbols

  • esri/symbols/PictureMarkerSymbol
    • Removed size property. Use height and width properties instead.

Tasks

  • esri/tasks/support/DirectionsFeatureSet
    • Removed fieldAliases property
  • esri/tasks/support/FeatureSet
    • Removed fieldAliases property
  • esri/tasks/support/IdentityParameters
    • Removed dynamicLayerInfos property

Views

  • esri/view/View, esri/views/MapView and esri/view/SceneView
    • Removed heightResizeMode and widthResizeMode properties. Use heightBreakPoint and widthBreakpoint properties instead.
    • Renamed animateTo() to goTo().
    • Removed createViewPoint(), and getLayerView() methods
    • Renamed the layer-view-create event to layerview-create
    • Renamed the layer-view-destroy event to layerview-destroy

Widgets

  • esri/widgets/Popup

    • Renamed the selectAction() method to triggerAction
    • Renamed the action-select event to trigger-action
  • esri/widgets/Search

    • Renamed the searchingAllEnabled property to searchAllEnabled
    • Renamed the search-results property to results
    • Renamed the suggest-results property to suggestions
    • Renamed the value property to searchTerm
    • Renamed the clear-search event to search-clear
    • Renamed the search-results event to search-complete
    • Renamed the suggest-results event to to suggest-complete
  • esri/widgets/Attribution/AttributionViewModel

    • Removed items and maxWidth properties
  • esri/widgets/BaseMapToggle/BasemapToggleViewModel

    • Renamed currentBasemap to activeBasemap.
    • Renamed secondaryBasemap to nextBasemap.
    • Removed items, maxWidth and basemaps properties
  • esri/widgets/Compass/CompassViewModel

    • Renamed the resetDirection() method to reset()
  • esri/widgets/Home/HomeViewModel

    • Renamed the goHome() method to go()
  • esri/widgets/Locate/LocateViewModel

    • Added goToLocationEnabled and graphic properties
    • Removed clearOnTrackingStopEnabled, graphicsLayer, locationSymbol, locationSymbolEnabled, popupTemplate, scale, tracking, trackingEnabled, updateLocationEnabled, and updateScaleEnabled properties
    • Removed clear() method
  • esri/widgets/Popup/PopupViewModel

    • Removed alignmentPositions, autoRepositionEnabled, closestFirst, docked, dockOptions, dockPositions, paginationEnabled, selectedIndex, updateLocationEnabled, visible, waitingForResult, zoomFactor, and zoomScale properties
    • Removed animateToCurrentLocation(), selectAction(), andzoomToCurrentLocation() methods
    • Renamed the selectAction() method to triggerAction
    • Renamed the action-select event to trigger-action
  • esri/widgets/Search/SearchViewModel

    • Renamed the searchingAllEnabled property to searchAllEnabled
    • Renamed the search-results property to results
    • Renamed the suggest-results property to suggestions
    • Renamed the value property to searchTerm
    • Renamed the clear-search event to search-clear
    • Renamed the search-results event to search-complete
    • Renamed the suggest-results event to to suggest-complete
    • Removed autoNavigate, buttonModeEnabled, expanded, graphicsLayer, highlightEnabled, highlightGraphic, labelEnabled, labelGraphic, labelSymbol, locationToAddressDistance, maxLength, minCharacters, popup, showPopupOnSelect, sourcesMenuEnabled, suggestionsMenuEnabled, and zoomScale properties
    • Removed cancelActiveSuggest(), delayedSuggest(), and select() methods

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.