Select to view content in your preferred language

ArcGIS API for JavaScript 4.23 and 3.40

3277
2
03-23-2022 10:42 AM
Noah-Sager
Esri Regular Contributor
5 2 3,277

Preamble

Today, we are pleased to release versions 4.23 and 3.40 of the ArcGIS API for JavaScript. Here are some of the 4.23 highlights (please refer to the 3.40 link at the end for 3.x updates). We also snuck in a hidden track towards the end of this blog, if you're into that sort of thing.

We fixed 25 bugs, made 9 enhancements, and added or updated 16 samples. We also updated the versions of ArcGIS Arcade and Calcite that are packaged with the API.

RL_blog_card.png

 

Main text

Great 3D update

3D has a new renderer and a new widget. You can now bring in heatmaps with the HeatmapRenderer, as well as add different weather conditions with the new Weather widget.

If you saw the 3D Mapping on the Web section of the 2022 Dev Summit plenary, then I know you’ll be excited about the new line style markers, labeling enhancements, and the virtual lighting. Note that a giant octopus is not a part of this release.

Lastly, there are also new analysis objects to enhance your client-side analysis workflows, and the VoxelLayer is officially out of beta.

https://developers.arcgis.com/javascript/latest/release-notes/#3d-updates

3d-line-markers.png

 

Reconciling differences

You can now switch the spatial reference of the MapView by changing the spatialReference property or by changing the basemap using the BasemapGallery or BasemapToggle widgets. 

https://developers.arcgis.com/javascript/latest/sample-code/basemaps-portal/

differences-gif.gif

 

In the flow

The FlowRenderer (formerly known as the Anne-imatedFlowRenderer) is out of beta. FlowRenderer now supports color, size, opacity visual variables, time-aware layers, smart mapping, printing, and webmap persistence.

https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-FlowRenderer.html

EC blog - in the flow.png

 

Fresh Editor widget

The “edit fresh refresh” introduces an updated UI that contains SnappingControls and a selection tool. The updated UI streamlines the process for creating and updating features, along with batch feature creation, which allows you to create multiple features of the same type with similar attributes at once.

https://developers.arcgis.com/javascript/latest/sample-code/widgets-editor-basic/

editor-in-action-gif.gif

Routing’s very own layer

RouteLayer is a new layer that provides routing analytics and route visualization in 2D MapViews. A RouteLayer consists of two or more stops, and optionally, barriers. Solved routes can be saved individually as an ArcGIS Online or Portal item, or as part of a webmap.

https://developers.arcgis.com/javascript/latest/sample-code /layers-routelayer/

EC blog - RouteLayer.png

 

There’s more if you act now

Update to 4.23 today and receive a slew of additional updates at no additional cost! Just imagine, an improved hitTest(), watching properties with reactiveUtils, OAuth updates, layer improvements, widget enhancements, better MapImageLayer labeling, printed legend support for tile layers, and so much more.

And now, time for something completely different.

 

Bonus Track

Title: Bugs Hurt (feat. ArcGIS API for JavaScript version 4.23)

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 it's affiliates.

 

[Intro]

Why maps great, ’til they gotta be great

woot

 

[Verse 1]

I just ran an integration test, turns out 4.23 is 100% that great

Even when I’m breaking stuff

Yeah, I got deprecations, that’s the engineer in me

Console log, then I solve ‘em, that’s the developer in me

You coulda had a modern web app, not too brittle

Help you with your GIS career, just a little

You’re supposed to update

But you’re stuck on 3x?

And that’s the sound, of me not using Flex

 

[Chorus]

Why maps great, ’til they gotta be great

Don’t print them, display it straight to my face

Esri Community sat me down in my home office

Update to 4.23, so I don’t end up like a raphus

Fresh Editor widget is a stout player

New class with the 4x RouteLayer

Bugs hurt, needed some more enhancements

Bon bons be bonne, da bomb flambée

 

[Verse 2]

You tried to break my app?

Oh that hurts, no cap

That you thought I wouldn’t catch it

I read release notes from the start

Hey, I’m glad you’re working from home

I mean who doesn’t love working alone?

I will never ever ever ever miss a coffee break

I put the java in javascript

Ain’t worried ‘bout an app that’s ill-equipped

So you can tell your coworkers: Take a break

While you’re awaiting

It’s OK, they’re already updating

 

[Chorus]

Why maps great, ’til they gotta be great

Don’t print them, display it straight to my face

Esri Community sat me down in my home office

Update to 4.23, so I don’t end up like a raphus

Fresh Editor widget is a stout player

New class with the 4x RouteLayer

Bugs hurt, needed some more enhancements

Bon bons be bonne, da bomb flambée

 

[Bridge]

I’m gonna test it in 3D

I don’t play tag, I watch it on TV

Updates get conveyed

API keys don’t get played

We just keep it pushing like ArcGIS Arcade

I’m gonna test it in 3D

I don’t play tag, I watch it on TV

Updates get conveyed

API keys don’t get played

We just keep it pushing like ArcGIS Arcade

 

[Chorus]

Why maps great, ’til they gotta be great

Don’t print them, display it straight to my face

Esri Community sat me down in my home office

Update to 4.23, so I don’t end up like a raphus

Fresh Editor widget is a stout player

New class with the 4x RouteLayer

Bugs hurt, needed some more enhancements

Bon bons be on da bomb flambée

 

References

Release Blog

https://www.esri.com/arcgis-blog/products/js-api-arcgis/announcements/whats-new-in-arcgis-api-for-ja...

RouteLayer Blog

https://www.esri.com/arcgis-blog/products/js-api-arcgis/developers/introducing-the-new-routelayer/

4.23 Release Notes

https://developers.arcgis.com/javascript/latest/guide/release-notes/index.html

4.23 Samples

https://developers.arcgis.com/javascript/latest/sample-code/?tagged=4.23

3.40 What’s New

https://developers.arcgis.com/javascript/3/jshelp/whats_new.html

Breaking Changes across all 4x releases

https://developers.arcgis.com/javascript/latest/guide/breaking-changes/index.html

Song inspiration

Truth Hurts

Fair use and Parody law

https://en.wikipedia.org/wiki/Fair_use

 

2 Comments
JoelBennett
MVP Regular Contributor

These are some great new features, and I'm continually impressed with the things that keep coming out each release. Many thanks to the team for all they continue to do to support us in turning out quality solutions for our customers. What I don’t doubt about 4.24 and subsequent releases is that they’ll continue to contain many powerful new features. What I do wonder about, on the other hand, is what they won’t contain.

Although the "bonus track" in the original post isn't an official position, it does invite a particular discussion...specifically the part about some being "stuck on 3x", and therefore presumably not updating to 4x. For my part, I started making the jump with 4.16, and after a 6-month process, completed it, and released our framework with 4.18. The transition wasn’t the most pleasant experience, but still good and valuable nonetheless. But here’s the main point of this post: if I had waited until ESRI had migrated everything we needed from 3x to 4x, my organization would still be “stuck on 3x” to this day as well.

For example, the 3x MapImageLayer, which we use heavily.  I’m aware about this recent post which says it’s targeted for 4.24, but I still mention it because it’s part of the larger point.  By now, this module has been “Coming Soon” for nearly five years.  I worked around its absence by writing my own implementation (which works, although is not ideal), but that isn’t necessarily an option for everybody else needing it.

Another example is the ScaleDependentRenderer. It was another one I had to create my own implementation for, during which I quickly discovered 4x unfortunately doesn’t support custom renderers like 3x did. Nonetheless, although one of your own recently said that implementing scale-dependent rendering in 4x is “super simple”, it’s been "Under Consideration" for years.

Other things that’ve made me wonder:

  • There hasn’t been a single item that’s made the jump in the functionality matrix in about a year.
  • The 3x home page once plainly said 3x would be retired in August 2022, but that notice quietly disappeared a few months after it showed up.
  • ESRI is still actively seeking to introduce people to the 3x-based Web AppBuilder with a recent “overview and concepts” blog that’s newer than the corresponding one for Experience Builder by 8 months.

All that is to say, from my limited outsider perspective, we seem to be getting some rather mixed messages. Is 4x parity with 3x no longer a priority? If it still is, is it expected to be reached anytime soon?

KristianEkenes
Esri Regular Contributor

Hey Joel,

Thanks for sharing your thoughts. I believe parity is always a priority, but we haven't been great at communicating what's planned or changes to our plans. Truthfully I forget about the functionality matrix, so I don't think to review it when I should do this in each release cycle. For example, I didn't realize ScaleDependedRenderer was  still "under consideration". In my mind, it was no longer a planned project since this can be implemented by the user by watching the view scale, like this sample: https://developers.arcgis.com/javascript/latest/sample-code/visualization-heatmap-scale/

That being said, the ScaleDependentRenderer is a simpler API for configuring scale-dependent rendering than writing a function to do it. This is the first I had heard of someone asking for it in 4x, so it wasn't a priority. I think this is something we can take a look at though. 

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