ArcGIS Online

Web maps and Map Viewer Beta

If you’ve used ArcGIS, you’ve likely created a web map at some point. You’ve added layers, selected a basemap, made some configurations then clicked Save. What is being saved, though? What exactly is a web map? ArcGIS Online documentation defines a web map as “an interactive display of geographic information that you can use to tell stories and answer questions”. An excerpt from The ArcGIS Book, Second Edition: 10 Big Ideas about Applying The Science of Where, further describes web maps as “online maps created with ArcGIS that provide a way to work and interact with geographic content organized as layers. They are shared across your organization and beyond on the web and across smartphones and tablets. Each map contains a reference basemap along with a set of additional data layers..”

These descriptions are accurate yet still don’t convey how you’re able to take geographic content organized as a collection of layers and display the content in a consistent manner regardless of the application being used to view the web map. Documentation on the ArcGIS for Developers site makes clear how this happens, defining a web map as  “a 2D map that you can create, style, and share between different applications. Web maps are JSON objects defined by the Web Map Specification and contain configuration settings for the map extent, basemap, layers, layer styles, pop-ups and more.”  The Esri Web Map Specification is the backbone for providing a consistent experience across multiple applications. When you create a web map in the current Map Viewer, also called Map Viewer (classic), you expect the map to look the same when you use it in a Configurable App, Web AppBuilder, StoryMaps, or any other ArcGIS application. This consistent experience happens because ArcGIS apps can read the web map specification and are committed to displaying web maps as defined in the spec. Furthermore, authoring apps are committed to producing web maps compliant with the web map spec.

This dialog is relevant now with the introduction of the new Map Viewer, currently available in Beta. Map Viewer Beta is built using ArcGIS API for JavaScript 4.x (JSAPI 4.x). The current Map Viewer, uses ArcGIS API for JavaScript 3.x (JSAPI 3.x). While both versions of the JSAPI support the web map specification, JSAPI 4.x enables Map Viewer Beta to introduce key features not available in the current Map Viewer (map rotation, vector symbols, multiline labels, to name a few). Additionally, Map Viewer Beta also uses a new implementation for authoring web maps. ArcGIS API for JavaScript 4.x now has the ability to author maps; the new Map Viewer leverages this API capability to create web maps.

In short, moving to ArcGIS API for JavaScript 4.x positions Map Viewer to introduce significant enhancements while also introducing a few temporary compatibility issues with some specific web map configurations. Understanding the evolution of web map authoring in Map Viewer Beta positions your organization to embrace current and future enhancements.  Ultimately however, web maps authored in Map Viewer Beta can be used across ArcGIS in the exact same capacity as web maps authored in the current Map Viewer.

Why change how Map Viewer authors web maps?

The ability to author web maps in Map Viewer (classic) was built directly into the app. Building a new Map Viewer using JSAPI 4.x  (Map Viewer (classic) uses JSAPI 3.x) meant also rebuilding how maps are authored. This presented an opportunity to consider how the authoring process can be improved under the hood. When the current Map Viewer was first introduced, there weren’t any other applications with the ability to author maps. It was reasonable for the authoring implementation to be wholly contained within Map Viewer itself. Ten years later, many applications are now writing or updating web maps. Without an API that handles the authoring process, applications have been required to build the ability to author web maps themselves (or get creative in how to handle this aspect). In addition to the investment necessary to build the logic for authoring spec-compliant web maps, any deviations from the spec could lead to an inconsistent experience across apps consuming web maps.   Adding the ability to author spec-compliant web maps to JSAPI 4.x means apps that require authoring functionality can use the JSAPI rather than building the logic themselves. Aside from saving time for developers, a central authoring component also helps ensure consistent adherence to the web map specification, which in turn means a more consistent and confident experience for users.

Support for web maps authored in Map Viewer Beta

As mentioned above, Map Viewer Beta uses ArcGIS API for JavaScript 4.x while Map Viewer (classic) uses ArcGIS API for JavaScript 3.x. Similarly, many of the web applications you’re familiar with use either JSAPI 3.x or JSAPI 4.x. Regardless of which version an app uses, web maps authored in Map Viewer Beta are supported. There are a few key areas where functionality in ArcGIS API for JavaScript 4.x has evolved beyond what is supported in ArcGIS API for JavaScript 3.x. This means an improved experience in Map Viewer Beta and other apps that use ArcGIS API for JavaScript 4.x. It does not mean these maps are unsupported in ArcGIS API for JavaScript 3.x or other platform apps. It does mean web maps can look a bit different in some cases when consumed in apps that use JSAPI 3.x. For example, dot density drawing style is supported in Map Viewer Beta and ArcGIS API for JavaScript 4.x. When a web map is authored with dot density drawing style applied to a layer, Map Viewer Beta and other ArcGIS API for JavaScript 4.x apps will display dot density as expected. However, in apps built using ArcGIS API for JavaScript 3.x where dot density is not supported, the layer with dot density will be displayed with a simple drawing style.

In general, web maps authored in Map Viewer Beta are better suited for display in apps built using ArcGIS API for JavaScript 4.x. Over time, additional enhancements will be supported in ArcGIS API for JavaScript 4.x but are not planned to be supported in ArcGIS API for JavaScript 3.x (therefore Map Viewer (classic) as well) . Examples of these types of enhancements include the ability to use vector symbols, save a map’s rotation and more.

Additionally, when using the current Map Viewer to update web maps authored in Map Viewer Beta, you will see a message indicating which layers have a configuration that is not supported in the current Map Viewer (and in apps built using ArcGIS API for JavaScript 3.x). For example, if you configure a pop-up in Map Viewer Beta which displays an attachment as a gallery, you will see a message indicating an unsupported pop-up configuration when the map is opened in Map Viewer (classic).

For additional details, see the Compatibility Guide for web maps created with Map Viewer (classic) and Map Viewer Beta.

Web maps authored in Map Viewer (classic)

Web maps authored in Map Viewer (classic) can be opened and updated in Map Viewer Beta. Furthermore, web maps authored in Map Viewer (classic) and subsequently updated in Map Viewer Beta are supported across the platform. However, in some instances where support has not yet been implemented for certain layer types or for specific functionality, the updated web map may not persist unsupported configurations. For example, if a web map contains a Table layer, the Table layer will not be persisted in the web map when saved in Map Viewer Beta.

In other instances where a layer type or specific configuration is not supported, Map Viewer Beta may not display the layer or configuration, but it is persisted when saving the map in Map Viewer Beta.  For example, WFS layers are not currently supported in Map Viewer Beta. If a map with a WFS layer is opened in Map Viewer Beta, the WFS layer is not displayed. However, if the map is saved in Map Viewer Beta, the layer is persisted as it was originally configured.

In general, when opening existing web maps in Map Viewer Beta that were authored in the current Map Viewer (or elsewhere), it is recommended to save as a new map. For more information, refer to the Compatibility Guide for web maps created with Map Viewer (classic) and Map Viewer Beta.

What does this mean for you?

It depends on your particular workflow. Web maps authored in Map Viewer Beta or Map Viewer Classic are supported across the platform. However, if you create a web map in Map Viewer Beta with the intent to use functionality only supported in ArcGIS API for JavaScript 4.x, you should only update the map using Map Viewer Beta. Similarly, if you have a mission critical map that was authored in Map Viewer (classic), it is recommended that you either save as a new map when updating the web map in Map Viewer Beta or first save a copy. You can then incorporate the updated web map into your mission critical workflow once you’ve confirmed the updated map displays and functions as expected.

For the best experience for web maps authored in Map Viewer Beta, it is recommended to use apps built using ArcGIS API for JavaScript 4.x. Over time, more web apps will be updated to use ArcGIS API for JavaScript 4.x instead of ArcGIS API for JavaScript 3.x. Until then, thinking strategically about how best to use the new features in Map Viewer Beta will position your organization to get the most out of the new Map Viewer.

More Information

Questions? Visit us on Geonet and join the conversation.

About the author

Chris Whitmore

Chris is a product engineer for ArcGIS Online.

Next Article

Latest County-Level COVID-19 Data in ArcGIS Business Analyst

Read this article