Release notes for 4.0
Version 4 of the ArcGIS Maps SDK 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.
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 thegeometry
property expected by feature collectionType
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 Maps SDK for JavaScript uses Dojo 1.10.4, dgrid version 1.0.0, and dstore version 1.1.1.
Classes/Objects that were renamed
ArcGISDynamic
is now called MapImageLayerLayer ArcGISElevation
is now called ElevationLayerLayer ArcGISImage
is now called ImageryLayerLayer ArcGISTiled
is now called TileLayerLayer Web
is now called WebTileLayer - take note of the removed 'd'.Tiled Layer Renamed
Initial
class toState Initial
, accessible from esri/webscene/InitialViewProperties or esri/webmap/InitialViewPropertiesView Properties Removed
Dynamic
classLayer
Properties, methods, and events that were renamed, or removed
Basemap
- esri/Basemap
- Removed
elevation
,Layers initial
,Extent spatial
, andReference visible
properties
- Removed
Color
- esri/Color
- Renamed
t
too Json() t
o JSON()
- Renamed
Map
- esri/Map
- Removed
initial
,Extent loaded
,load
,Error load
andStatus spatial
propertiesReference - Removed
always()
,cancel
,Load() get
,Layer() i
,s Fulfilled() i
,s Rejected() i
,s Resolved() 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
show
propertyAttachments
- Removed
Request
- esri/request
- Removed
set
methodRequest P r e Callback()
- Removed
WebScene
- esri/WebScene
- Removed
initial
andExtent initial
propertiesState - Removed
get
methodLayer() - Removed
layer-add
,layer-remove
, andlayer-reorder
events
- Removed
- esri/webscene/Lighting
- Renamed the
ambient
property toOcclusion ambient
Occlusion Enabled - Renamed the
direct
property toShadows direct
Shadows Enabled
- Renamed the
Instead, see the Collection change event to listen for when items get added, moved or removed.
- esri/core/Collection
- Removed
add
,Item() add
,Items() clear
,get
,All() move
,Item() remove
,Item() remove
, andItem At() remove
methodsItems()
- Removed
Geometry
- esri/geometry/Extent
- Removed
normalize()
andshift
methodsCentral Meridian()
- Removed
- esri/geometry/Point
- Removed
normalize()
andoffset()
methods
- Removed
- esri/geometry/SpatialReference
- Removed
i
methods W e b Mercator()
- 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
get
methodLayer()
- Removed
- esri/layers/SceneLayer
- Removed
add()
,clear()
, andremove()
methods
- Removed
- esri/layers/VectorTileLayer
- Renamed
set
method toStyle() load
Style()
- 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:
searching
is now searchAllEnabledA l l Enabled search-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.select
method was renamed to triggerAction.Action()
- esri/layers/support/ImageParameters
- Removed
dpi
,extent
,format
,height
,image
,Spatial Reference layer
,Ids layer
,Option transparent
, andwidth
properties
- Removed
Renderers
- esri/renderers/ClassBreaksRenderer
- Renamed the
attribute
property toField field
- Renamed the
infos
property toclass
Break Infos - Renamed the
add
method toBreak() add
Class Break Info() - Renamed the
get
method toBreak Info() get
Class Break Info() - Renamed the
remove
method toBreak() remove
Class Break Info() - Removed
get
,Break Index() get
,Color() get
,Opacity() get
,Size() get
,Symbol() get
, andVisual Variables F o r Type() has
methodsVisual Variables()
- Renamed the
- esri/renderers/UniqueValueRenderer
- Renamed the
attribute
property toField field
- Renamed the
attribute
property toField2 field2
- Renamed the
attribute
property toField3 field3
- Renamed the
infos
property tounique
Value Infos - Renamed the
add
method toValue() add
Unique Value Info() - Renamed the
remove
method toValue() remove
Unique Value Info() - Renamed
color
Info, opacity
, andInfo size
visual variable types toInfo color
,opacity
, andsize
.
- Renamed the
Symbols
- esri/symbols/PictureMarkerSymbol
- Removed
size
property. Useheight
andwidth
properties instead.
- Removed
Tasks
- esri/tasks/support/DirectionsFeatureSet
- Removed
field
propertyAliases
- Removed
- esri/tasks/support/FeatureSet
- Removed
field
propertyAliases
- Removed
- esri/tasks/support/IdentityParameters
- Removed
dynamic
propertyLayer Infos
- Removed
Views
- esri/view/View, esri/views/MapView and esri/view/SceneView
- Removed
height
andResize Mode width
properties. UseResize Mode height
andBreak Point width
properties instead.Breakpoint - Renamed
animate
toTo() g
.o To() - Removed
create
, andView Point() get
methodsLayer View() - Renamed the
layer-view-create
event tolayerview-create
- Renamed the
layer-view-destroy
event tolayerview-destroy
- Removed
Widgets
esri/widgets/Popup
- Renamed the
select
method toAction() trigger
Action - Renamed the
action-select
event totrigger-action
- Renamed the
esri/widgets/Search
- Renamed the
searching
property toA l l Enabled search
A l l Enabled - Renamed the
search-results
property toresults
- Renamed the
suggest-results
property tosuggestions
- Renamed the
value
property tosearch
Term - 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
andmax
propertiesWidth
- Removed
esri/widgets/BaseMapToggle/BasemapToggleViewModel
- Renamed
current
toBasemap active
.Basemap - Renamed
secondary
toBasemap next
.Basemap - Removed
items
,max
andWidth basemaps
properties
- Renamed
esri/widgets/Compass/CompassViewModel
- Renamed the
reset
method toDirection() reset()
- Renamed the
esri/widgets/Home/HomeViewModel
- Renamed the
g
method too Home() go()
- Renamed the
esri/widgets/Locate/LocateViewModel
- Added
g
ando To Location Enabled graphic
properties - Removed
clear
,On Tracking Stop Enabled graphics
,Layer location
,Symbol location
,Symbol Enabled popup
,Template scale
,tracking
,tracking
,Enabled update
, andLocation Enabled update
propertiesScale Enabled - Removed
clear()
method
- Added
esri/widgets/Popup/PopupViewModel
- Removed
alignment
,Positions auto
,Reposition Enabled closest
,First docked
,dock
,Options dock
,Positions pagination
,Enabled selected
,Index update
,Location Enabled visible
,waiting
,F o r Result zoom
, andFactor zoom
propertiesScale - Removed
animate
,To Current Location() select
, andAction() zoom
methodsTo Current Location() - Renamed the
select
method toAction() trigger
Action - Renamed the
action-select
event totrigger-action
- Removed
esri/widgets/Search/SearchViewModel
- Renamed the
searching
property toA l l Enabled search
A l l Enabled - Renamed the
search-results
property toresults
- Renamed the
suggest-results
property tosuggestions
- Renamed the
value
property tosearch
Term - Renamed the
clear-search
event tosearch-clear
- Renamed the
search-results
event tosearch-complete
- Renamed the
suggest-results
event to tosuggest-complete
- Removed
auto
,Navigate button
,Mode Enabled expanded
,graphics
,Layer highlight
,Enabled highlight
,Graphic label
,Enabled label
,Graphic label
,Symbol location
,To Address Distance max
,Length min
,Characters popup
,show
,Popup On Select sources
,Menu Enabled suggestions
, andMenu Enabled zoom
propertiesScale - Removed
cancel
,Active Suggest() delayed
, andSuggest() select()
methods
- Renamed the