ArcGIS API for JavaScript

ArcGIS API for JavaScript versions 4.6 and 3.23 released

Just in time for the new year, Versions 4.6 and 3.23 of the ArcGIS API for JavaScript have arrived, bringing new capabilities such as a directions widget, 3D measurement widget, and layer refresh. Here are some of the release highlights you’ll find in 4.6 and 3.23.

Directions Widget (Beta)

If you’re taking a trip to parts unknown, then the Directions widget is right for you. Currently in beta, this widget calculates directions between two or more locations and makes it easy to add turn-by-turn directions to a page as well as a route on a map. The widget defaults to the ArcGIS Online route service but can be configured to use any ArcGIS Server Network Analyst routing service. To explore further, see the Directions sample.

Directions Widget

3D Measurement Widget

3D measurements have never been easier or more fun than they are now, with the new DirectLineMeasurement3D widget. You can measure the vertical, horizontal, and direct distance between two points. When the widget is active, a horizontal “laser” line is drawn which indicates the height at the current mouse position. This line can help in analyzing the heights of objects relative to each other and the terrain. The Direct line measurement in 3D sample shows how to use this widget.


DirectLineMeasurement3D widget

Layer Refresh Interval

Keep your maps in sync with the latest data while the map is open by using a refresh interval. For example, you might have a map with a damage assessment feature layer that field workers update every few minutes. Using a refresh interval with this damage assessment layer helps your office team see the latest feature data from the field while keeping the map open in their browser, desktop, or device. If you have multiple layers configured with the same refresh interval duration, they will be updated at the same time.

2D WebGL FeatureLayer Progress

Simply put, WebGL allows more data to be displayed faster. We are continuing to improve the user experience for the 2D WebGL-rendered version of FeatureLayer, which is still in beta. At 4.6, some of the processing in the layer has moved to workers using the API’s workers framework. 

Improved Compatibility with ES6 Promises

At 4.6, then() is deprecated in favor of when(). The then() method will still be honored at 4.6, but will throw warning messages in the console, to ease the process of updating apps to using when() on loadable classes. We made this change to allow the use of native ES6 promises within the context of the ArcGIS API for JavaScript. At version 4.7 (Spring 2018), then() will be removed from all applicable classes, making this a breaking change. See the Release Notes for more information.

TypeScript Enhancements

The TypeScript declaration file for the ArcGIS API for JavaScript describes the shape of the API to TypeScript. Learn more about how to install it with the dedicated guide page or on GitHub. Version 4.6 introduces several improvements, read more about the improvements in this blog post.

Support for Geometry Operations in Arcade with 3.23

Arcade expressions now support geometry operations that allow you to perform overlay, proximity, topological relationship testing, and measurement operations. We added the Create a Geofence with Arcade sample to demonstrate how you can drive visualization based on on-the-fly geometric operations; in this case when city buses enter the downtown LA area.

Create a Geofence with Arcade

Website Enhancements

Not every update is just about the applications; we also made a few special modifications to our SDK to make the website easier to use. We added Keyboard Accessibility support to Home, Guide, API Reference, Sample Code, and Sandbox. Use Shift ? to display the help menu on each page.

Learn more

Explore the release notes and new samples to learn more about what’s new in the API, such as: the full screen widget which lets users expand your app to full screen, updates to vector basemaps, arrow marker symbols, KMLLayer updates, and more.

Version 4.6 release notes
Version 4.6 samples
Version 3.23 release notes
Version 3.23 samples

About

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

About

20+ years of experience with web mapping. Currently lead project engineer for the ArcGIS API for JavaScript development team at Esri. トレイルランニングをするのが好きです。

Next Article

Making Better Promises

Read this article