Select to view content in your preferred language

ArcGIS API for JavaScript 4.24 and 3.41

06-23-2022 01:07 PM
Esri Regular Contributor
2 7 1,346


Let’s set the table: welcome to the release of versions 4.24 and 3.41 of the ArcGIS API for JavaScript. Here are some of the 4.24 highlights (please refer to the 3.41 link at the end for 3.x updates). I also snuck in some dessert towards the end of this blog, if you're into that sort of thing. We fixed 27 bugs, made 8 enhancements, and added or updated 15 samples. We also bid farewell to Internet Explorer 11.




Tasks have been deprecated since 4.20. They were removed at 4.24. The API now uses WebGL2 by default, and it will fallback to WebGL1 depending on the browser. FeatureLayers can be saved to ArcGIS Online and ArcGIS Enterprise with the new save() and saveAs() methods. MapView and SceneView hit test results now return GraphicHit and MediaHit results.





Weather affects maps too. Make your scenes more immersive with the new rainfall and snow effects. And/or, you can explore and use free OpenStreetMap 3D data hosted by ArcGIS Living Atlas. These 3D layers present buildings, thematic trees, and realistic trees based on OpenStreetMap (OSM) data, which will be updated every month. Also, blend modes can now be used in 3D scene views to blend layers together to create a variety of very vibrant and intriguing results, unlike the method of using transparency which can result in a washed-out top layer. We enhanced the daylight widget with an option to change the lighting mode to virtual light.

3-dimensional.gif - 3d-updates


It’s the routing, not the destination

The Directions widget is now integrated with the RouteLayer, which means that it should now be instantiated with a new or existing RouteLayer. New functionality includes the ability to save routes, and modify the visibleElements in the Directions widget UI. The Directions widget can also open and edit existing route portal items. RouteLayer can use custom symbology with the defaultSymbols property, and now works in both 2D MapViews and 3D SceneViews.



Follow Print the north star arrow

The Print widget now has an option to “Include north arrow” in the Advanced options, and rest/print also has a configurable property to include the north arrow in the printout. Note that the print service must have a north arrow configured on a per-layout basis for this option to be available.

print north arrow.png


Heatmap Summer

The HeatmapRenderer now renders with WebGL, which means it can now take advantage of the following benefits:

  • More data can be rendered
  • Interacting with heatmaps is faster, smoother, and potentially hotter
  • Data can now be filtered using FeatureFilter and FeatureEffect
  • Underlying points in a heatmap can now be labeled, display popups, and be returned in a hitTest

We also added a referenceScale property, which allows you to lock-in the heatmap visualization at a specific scale so it will appear consistent when zooming in and out.

heatmap.png - improved-heatmaprenderer


Awesome Arcade API

Awesome app developers now have the ability to compile and execute Arcade expressions in their own custom profiles. They will be able to do the following:

  • Execute expressions already written for existing ArcGIS profiles in another context
  • Evaluate Arcade expressions to display feature values outside the popup in a custom component
  • Define custom Arcade profiles and provide a configurable experience within an app for users to write their own expressions


Binning: clients first

Binning is a technique that changes the way data displays at small scales. It converts the original data values into a range of smaller intervals, which are known as bins. Binning is also a new feature reduction method added as an alternative to clustering and heatmaps in 2D MapViews. You can configure the labels, popups, fields, and renderer of a layer's bins. Server-side binning, which will allow you to display aggregates of very large datasets, will be added at a future release.



Easy as pie charts

The PieChartRenderer allows you to visualize multiple attribute values of a feature in a point or polygon layer in a 2D MapView. The value of each pie slice can be determined by a field value or Arcade expression. Use the PieChartRenderer with visualVariables to vary the size of the pie chart based on an Arcade expression, such as the sum of its fields.

pie charts.png


Social media layers

The MediaLayer class is used to add image and video elements to the map at a specified geographic location. So it’s like an enhanced version of the 3x MapImageLayer. This layer can be used to display old scanned maps, weather data, satellite imagery, fantasy images, videos, and more! The geographic location of the image or video can be set using the extent and rotation, or the corner points.



And now, time for something slightly different.



Title: Doctor ArcGIS API for JavaScript (feat. version 4.24)

Disclaimer: The views and opinions expressed in the below song are those of the author and do not necessarily reflect the official policy or position of Esri, or any of its affiliates.


They call me Doctor ArcGIS API for JavaScript

Good morning, how are you? I’m version 4.24

I’m interested in enhancements

I’m not really a doctor

But I am a real API

I am an actual API

I make pretty maps


I like to visualize spatial data

I think I’m getting good

When I use the new MediaLayer

I’ll show you pie chart rendering

And you can tell me if you think

You’ll need to print client-side binning

I’ll enhance the Directions widget

‘Cause it needs a RouteLayer


When I’m coding

I can’t tell if you are

Using the Arcade executor API

When I get released, you can

Use improved heatmaps

And save feature layers


Some day, somebody else besides me will

Release a new version, they will

Call me version 4.24

Good morning, how are you? I’m version 4.24

I’m interested in enhancements

I’m not really a doctor

But I am a real API

I am an actual API

I make pretty maps

And I like to visualize spatial data

I think I’m getting good

When I use the new MediaLayer

I’ll show you pie chart rendering

And you can tell me if you think

You’ll need to print client-side binning

I’m not really a doctor

But they call me version 4.24



Release Blog

Tasks/rest blog

Routing & Directions blog

4.24 Release Notes

4.24 Samples

3.41 What’s New

Breaking Changes across all 4x releases

Song inspiration

Doctor Worm

Fair use and Parody law


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.