Select to view content in your preferred language

ArcGIS API for JavaScript 4.21 and 3.38

09-22-2021 03:21 PM
Esri Regular Contributor
2 0 1,183

“Autumn is a second spring when every leaf is a flower.”


Welcome to the autumnal release of the ArcGIS API for JavaScript.

We fixed 27 bugs. Created or updated 7 samples. Improved performance. Updated layers, widgets, and made many more enhancements. Buckle up.


Performance enhancing improvements

For complex polygons with many vertices, layer draw time has significantly improved. While your mileage may vary, most cases will see at least a 2-3x improvement. We've also added some optimizations for the way we handle maps with a large number of feature collections. These optimizations have resulted in an improved start time and an improved frame rate for smoother map panning. At version 4.19, we improved the performance of point FeatureLayers hosted on ArcGIS Online. Version 4.21 brings these same enhancements to ArcGIS Enterprise.

This Arctic sea ice layer loads over 5x faster than the same layer in 4.20.This Arctic sea ice layer loads over 5x faster than the same layer in 4.20.


Orderly conduct

You can configure the order features are drawn in the view by setting the orderBy property of a FeatureLayer, CSVLayer, GeoJSONLayer, and OGCFeatureLayer. In layers with date fields that have many overlapping features, this property allows you to ensure the most recent features are drawn on top of older ones. This property is also important in proportional symbol maps where smaller features are typically rendered on top of large ones to maximize the visibility of overlapping features in the view.

Control the drawing order of featuresControl the drawing order of features


>2 Dimensions

SceneView now allows you to fully leverage your WGS84 scene layers by combining them with Web Mercator layers in local scenes. Local scenes now support geographic coordinate systems, giving you more flexibility in displaying data. Additionally, SceneView now uses WebGL2 (if available in the browser) as the underlying rendering engine. This change is the basis for future visualization capabilities and performance enhancements.

Local scene support for WGS84Local scene support for WGS84


Visit widget exhibits

The SnappingControls widget was added to provide a simple user interface to handle all snapping functionality. This widget provides the ability to control whether snapping is enabled, which layers to snap to, and other snapping settings. SnappingControls can only be used in conjunction with the Sketch, SketchViewModel, Editor, and EditorViewModel.

The SketchViewModel has been updated to override the active drawing symbology, if there is a pointSymbol, polygonSymbol, or polylineSymbol set. 

The FeatureTable widget added support for the following layer types: CSVLayer, GeoJSONLayer, ImageryLayer, and WFSLayer.

The TimeSlider widget has been updated to support custom actions, which allows you to execute custom code such as such as setting the timeExtent to a specific date or copying the timeExtent to the browser's clipboard.

The Popup widget has been updated to display an error message if any errors occur when accessing its content.

You can override what content is queried and displayed in the Popup or Feature widgets with the featureViewModelAbilities and abilities properties, respectively.

The Search widget suggestion behavior was enhanced to make the search experience smoother and faster.


More modern documentation

A new guide page details how you can use the Calcite Design System in your applications. Browse the library of Calcite icons and view samples that use Calcite components with the ArcGIS API for JavaScript.

The CIM Symbol Builder has been updated to support line and polygon symbols. Combine different symbol layers, update symbol layer properties, and watch how the CIMSymbol updates. When you've created your perfect symbol, get the symbol JSON and use it to create CIMSymbols in your own applications.

CIM Symbol Builder - support for lines and polygonsCIM Symbol Builder - support for lines and polygons


Further reading

Want more? We also have clustering updates. Utility Network updates. WebMap persistence updates. API key updates. Check out the release notes and the release blog to experience all these great new features today.




Release Blog


4.21 Release Notes


4.21 Samples


3.38 What’s New


Breaking Changes across all 4x releases


About the Author
Noah Sager is a Product Engineer on the ArcGIS Maps SDK for JavaScript team at Esri. Prior to joining Esri, he mapped utility lines around Appalachia, investigated public restroom access in Chicago, and studied foraging behavior in squirrels in Canada.