ArcGIS API for JavaScript 4.20 and 3.37

1653
4
06-30-2021 02:22 PM
AnneFitz
Esri Regular Contributor
2 4 1,653

“A jack of all trades is a master of none, but oftentimes better than a master of one.”

https://en.wikipedia.org/wiki/Jack_of_all_trades,_master_of_none

Welcome to the 4.20 “jack of all trades” release.

We fixed 45 bugs. Created or updated 10+ samples. Added new layers, updated and added some widgets, and made so many more enhancements.

 

Lay-er it on me

Making its ArcGIS API for JavaScript 4x debut is the WFSLayer. This layer allows you to create layers from an OGC Web Feature Service.

The WFSLayer sample allows you to browse FeatureTypes on the WFS service.The WFSLayer sample allows you to browse FeatureTypes on the WFS service.

 

Measuring in 3D got enhanced with the new DirectLineMeasurementLayer and AreaMeasurementLayer. These layers display measurement results and allow for programmatic entry of measurement points.

https://developers.arcgis.com/javascript/latest/release-notes/ - analysis-layers-beta

 

The SubtypeGroupLayer and SubtypeSublayer make it easier to work with feature layers with many subtypes, such as layers used with utility networks. Speaking of utility networks, we will be adding support for the utility network over the next couple of releases. In this release, we added initial support for the utility network and simple network tracing. 

https://developers.arcgis.com/javascript/latest/release-notes/ - utility network

The SubtypeGroupLayer allows you to define a renderer and labels on each sublayer.The SubtypeGroupLayer allows you to define a renderer and labels on each sublayer.

Let’s keep it going. The FeatureLayer supports querying for top features with a variety of new methods. The OGCFeatureLayer can be saved in a WebMap. The WMSLayer and WMSSublayer support time dimensions. And the applyEdits() method can now edit features associated with multiple layer or tables. And more!

https://developers.arcgis.com/javascript/latest/release-notes/ - layer-updates

 

Squeaky widget gets the grease

All widgets now have a visible property to allow or prevent rendering. Many widgets now have a headingLevel property to allow changes to the level of the heading elements. For 2D point geometries, snapping is available in the Editor and Sketch widgets. The TimeSlider widget has a visual cue when the time settings are not valid. The CoordinateConversion widget now uses sessionStorage instead of localStorage. The ElevationProfile widget now has the ability to clear a drawn line with the click of the trash icon. And more!

https://developers.arcgis.com/javascript/latest/release-notes/ - widget-updates

 

More cowbell 3D Updates

A new ShadowAccumulation widget, besides looking beautiful, also provides different visualization types for a selected time range and date. We now can provide a tabular view for the features of a SceneLayer using the FeatureTable widget. And now Polygon edges and Polyline segments can be offset using the SketchViewModel. 

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

The new Shadow Accumulation widget in 3D.The new Shadow Accumulation widget in 3D.

API Keys are key

More better support for API keys shouldn’t surprise you. We added initial support for API keys at version 4.18. Now at 4.20, we added fine-grained control of API keys for FeatureLayer, SceneLayer, TileLayer, BuildingSceneLayer, IntegratedMeshLayer, and PointCloudLayer. We also improved support for API keys in the Directions and Search widgets. Now, both the routing and geocoding components default to the appropriate URL if an API key is defined.

https://developers.arcgis.com/javascript/latest/release-notes/ - api-keys

 

Rest up with fewer tasks

At version 4.19, we ported the majority of Task functionality to simple functional rest modules. This made it easier to incorporate into a more modular app design, and also reduced unnecessary dependencies. At 4.20, we ported the remainder classes to rest modules and deprecated the Task and Task support classes.

https://developers.arcgis.com/javascript/latest/release-notes/ - rest-modules

 

Please sir,  I want some more

Smart mapping updates. Slider enhancements. MapView constraint upgrades. We have a lot more to give you. Check out the release notes and release blog to master all this great new stuff today.

 

References

Release Blog

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

4.20 Release Notes

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

4.20 Samples

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

3.37 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

 

This blog was written in collaboration with @Noah-Sager 

4 Comments
JoelBennett
MVP Regular Contributor

Thank you for the information and hard work done on this release, I'm looking forward to putting it to use.

Between now and then, could you please explain the breaking change "RotateEventInfo.angle is now reported in degree by the SketchViewModel"? The documentation for that property is still exactly the same as it was in 4.19.

JoseBanuelos
Esri Contributor

Hello @JoelBennett ,

The RotateEventInfo.angle was a bug fix for SceneView. The angle value being returned was not in correct degrees. This was fixed in this release, so it should actually be in the bug fixes section and not the breaking changes. I apologize for that misunderstanding, I will fix this.

JoelBennett
MVP Regular Contributor

@JoseBanuelos, thank you for providing that clarification; it is definitely helpful.

I do have one other question as well. Starting in 4.20, Locator (and everything else in the tasks namespace) has been deprecated, and we're directed to use locator instead. This is well and good, except that in at least one case, the API itself still requires the use of esri.tasks.Locator. For example, when using the Search widget against a locator service, the locator property of LocatorSearchSource still requires an instance of esri.tasks.Locator. Will or can this be addressed in the next release?

AnneFitz
Esri Regular Contributor

Hi @JoelBennett - thank you for pointing this out. Yes, this is on our radar, and we plan to address this in an upcoming release (either 4.21 or 4.22).