ArcGIS API for JavaScript 4.0 beta 2 released

We are excited to announce that beta 2 of the ArcGIS API for JavaScript 4.0 is now available.

We have been busy working on adding functionality to the next generation JavaScript API, which includes new layer types, a redesigned popup experience, support for reading Web Scenes, new tasks, widgets, security, and more. For all the details on what’s new in this release, see the What’s New in Version 4.0 beta 2 page.

The following are some of the highlights of this release.


Vector tile layers display cached data similar to image tiles, but they store a vector representation of the data. Client-side drawing of vector tiles allows for customizing the style of the layer which can drive dynamic, interactive cartography. For more information see the VectorTileLayer documentation in the API Reference and the Vector tile layers topic in the ArcGIS Online Help.


We redesigned the popup experience to enhance the interactivity of mapping applications. They are responsive to device size, making them more mobile friendly. Developers can customize options to dock the popup in the view, create actions within the popup, and have more control over the popup behavior. See the following three examples for more details on what may be accomplished with the new popup.

Popup actions

The Popup widget may contain actions, or buttons, that allow users to execute functions when clicked.

Dock your popups

By default the popup docks automatically based on screen size. The developer can further customize options for popup placement and docking.

Advanced Popups

You can easily control the popup’s content, location, and visibility. For example, the popup can be used to show custom content or analysis results.

Web Scenes

Reading Web Scenes

The API adds support for reading Web Scenes. All you need to do is reference the ID of the Web Scene:

// Modules required: 
// esri/WebScene
// esri/portal/PortalItem

var scene = new WebScene({
  portalItem: new PortalItem({
    id: "affa021c51944b5694132b2d61fe1057"  //ID of the WebScene on

You can programmatically interact with the various properties of the scene including its layers, environment settings, and slides.

Local Web Scene support

Local scenes are the best way to show your regional or local data in a projected coordinate system. This includes support for mapping subsurface features and navigating below the surface. The following sample demonstrates this by mapping earthquakes and oil and gas well locations below the surface of the ground.


Image layer support

The ArcGISImageLayer gives you the ability to display, process, and render pixels from an ArcGIS image service. This is useful when you need to interactively manipulate pixel values and get an immediate response in the browser. See the sample referenced below for an example of using pixel filter to render pixel values on a two-color ramp.

Dynamic layer support

In addition to tiled services and image services, you can access dynamic map services using ArcGISDynamicLayer.


The following tasks are also part of this release.

Be sure to check out the following samples for details on how to use some of these new tasks.

Find features without a mapIdentify TaskQuery features using QueryTaskSimple Routing

Follow the link associated with the graphic below to explore the geoprocessing viewshed sample.


The Home widget is used for returning to a predefined viewpoint. The Locate widget is a button for navigating to your location. Follow the link attached to the image for more information on the Locate widget, or check out the Home widget in the sample code.


The required CSS for all ArcGIS for JavaScript applications was renamed from esri.css to main.css.


Esri provides support via the standard Technical Support channels for version 4.0. You may also post and view questions on the GeoNet “4.0 beta” forum. Please tag forum posts with “4.0beta”.

Documentation enhancements

We have introduced more Getting Started guides. We hope you find these useful as we plan to write more as we move forward. In addition, you are able to search for samples. Search for all the samples that use “sceneview” or “3d” by using the “Search samples” input at the top of the sample code navigation.

We hope you enjoy the beta releases.

About the authors

Working daily to elevate user happiness about reading the ArcGIS Maps SDK for JavaScript documentation. Occasionally blogging about the ArcGIS Maps SDK for JavaScript, and technical presenter at the Esri Developer Summit and User's Conferences. A Product Engineer on the Esri ArcGIS Maps SDK for JavaScript team.


20+ years of experience with web mapping. Currently lead project engineer for the ArcGIS Maps SDK for JavaScript development team at Esri.


Julie Powell is a Principal Product Manager, focusing on Esri's web development technologies. She works to ensure developers can be successful in building state of the art, purposeful solutions using ArcGIS software. Julie brings 20 years of experience working with global leaders such as Hewlett-Packard and Esri, delivering a variety of software solutions for both the enterprise and consumer markets. Julie has worked on a wide range of projects and consulting endeavors, including serving as technical lead for web mapping solutions for strategic customers.


Next Article

Global Streamflow Forecast from GEOGLOWS Available in Living Atlas

Read this article