April 18, 2021

ArcGIS Upgrades their JavaScript API to Version 4.18

4 min read

It seems like the last days of 2020 were the busiest days at ESRI for the developers of the ArcGIS API for JavaScript as they have introduced version 4.18 of their API. As noted on their website, this upgrade will be a game changer in both 2D and 3D apps. Included in the upgrade is the removal of IE11 and Edge Legacy support which is very unfortunate for some of the users but it also presents opportunities for some system upgrades.

Before we dive into the details of the update we are just going to say goodbye to 2020.

Content in this post has been placed in summarized format based on the update that the ArcGIS team gave ion their website.

Let’s have a look at what this upgrade means to the Geo-spatial world of developers.

ES Modules (Beta)

If you use the ArcGIS API for JavaScript with a third-party framework such as Angular or React or create custom builds of the API, this process just got easier. ES modules is a new option for consuming the API, which enables simplified code and seamless integration with modern frameworks and build tools.

Review the ES modules guide topic for the complete steps necessary for using ES modules. There are also sample apps available that demonstrate the core concepts for integrating the modules with various frameworks and tools.

You are wondering whether you should Migrate to ES Modules?

If you aren’t integrating with a framework or creating custom builds of the API, there is no need to migrate to the new ES Modules. The AMD modules (which is the alternative – and original – way that the API can be consumed) will continue to be available alongside the ES modules for the foreseeable future. Both formats have the same capabilities because they are built from the same code base.

Query clustered features

You can query features from clusters to get access to the underlying features represented by a cluster. This allows you to do the following:

  1. Query statistics for the clustered features.
  2. Display the visible extent of a cluster’s features.
  3. Calculate and display the convex hull for clustered features.
  4. Display the features belonging to a cluster.

View the live presentation below:

Gif Source: ESRI Blog

Layer effects

You can now apply Effects to all layers in 2D MapViews, either to features that meet filter criteria or across an entire layer. This powerful capability allows you to apply css filter-like functions to layers to enhance the cartographic quality of your maps.

Applying an effect selectively based on filter criteria via FeatureEffect was released in version 4.11. This release introduces the ability to apply an effect across an entire layer, and introduces the new effect types – bloom, drop-shadow and blur. Let’s explore each of these!

The blur effect applies a Gaussian blur to the layer and it makes it look out of focus or blurry. One use for it is to soften a layer underneath a reference layer, or other layers of importance, so the features above it can stand out more clearly. You can also use it to visualize uncertainty to non-discrete boundaries like habitat boundaries.

This effect produces fringes of light extending from the borders of bright areas in a layer. You can add glow to your layers when mapping fires, volcanic eruptions, night lights, or to put an electric highlight on features you want to draw attention to (like in the updated sample that shows New York building footprints by construction year). You can combine multiple effects in a layer, and use effects on any number of layers in a map. In the below map, active fire locations have a bloom effect while the smoke layer has several effects including blur for a fuzzy boundary.

Drop shadow
This effect is useful when you want some features to stand out from the rest of the features on a busy map. For example, you can apply this effect to your labels (reference layer) to make them legible.

Elevation profile widget (beta)

Create elevation profile charts using the new ElevationProfile widget, available in both MapView and SceneView. Interactively draw or select existing lines in your map or scene to compare heights for terrain but also 3D objects such as buildings. The chart is computed using the ground’s elevation and provides additional statistics along the line. Customize the widget by toggling its visible elements and adjusting labels and line colors.

Elevation profile widget
Interactively create elevation profile charts for terrain and 3D objects.
Source: ESRI Blog

Some of the features that have improved in the service also include:

  • 3D Editing
  • Context-aware navigation
  • Order-independent transparency
  • Mars & Moon Support
  • Vector Symbol Builder
  • Sketch Widget Selection

Yes that’s right Mars and Moon support has been included to the package. Use SceneView to explore imagery and elevation layers of the Moon and Mars but also feature layers containing mapped information about these astronomical bodies. Atmosphere and physical dimensions used in interactive tools such as measurements are automatically adjusted when loading a layer with a supported extraterrestrial coordinate system.

error: Content is protected !!