ArcGIS Dashboards

Make your Dashboards more Dynamic using URL Parameters

Operations Dashboard for ArcGIS is a configurable web app for creating dynamic dashboards to monitor people, services, assets and events in real time. Since its release a year ago, it’s become one of the most popular apps in ArcGIS Online, used in many different industries and workflows. Some examples:

With the December 2018 update, Operations Dashboard now supports Uniform Resource Locator (URL) parameters. URL parameters are properties whose values are set dynamically in a web page’s URL – in this instance, the dashboard’s URL – enabling Dashboard authors to configure incredibly flexible dashboards.

For example, URL parameters come in handy when your dashboard is embedded in another application and the hosting app needs to control how the dashboard displays at runtime. You can use URL parameters to change the current dashboard display by triggering an action when the dashboard loads.

URL parameter examples

Let’s explore some examples that illustrate the power of URL parameters in dashboards. Below is a dashboard that shows world cities, their country location, population, and capital city status. When the map extent changes, the two indicators and the list elements are filtered based on the updated spatial extent. The following image shows the default dashboard display:

World Cities Dashboard

The dashboard’s default URL is:

https://www.arcgis.com/apps/opsdashboard/index.html#/558f846d67f749afa7f9f9080e31786e

This dashboard has been configured with additional properties (that is, URL parameters), so when it opens, its display will change based on the information passed in. For example, to make the dashboard only display megacities (e.g., cities with a population of 10 million or greater) a parameter can be added to the URL as follows:

https://www.arcgis.com/apps/opsdashboard/index.html#/558f846d67f749afa7f9f9080e31786e?pop=10000000

Here’s what the dashboard looks like with this URL parameter:

World Cites Dashboard showing megacities

Note the syntax “?pop=10000000” means the following:

A URL parameter always consists of a “name=value” pair. The generalized syntax for a dashboard URL is:

<scheme>://<yourPortalUrl>/apps/opsdashboard/index.html#/<id>?param=value

Each URL parameter is configured to have one or more target elements. In the preceding example, observe that the map, list, and both indicator elements were filtered because they were set as target elements. There was no change to the serial chart element, because it was not set as a target.

To apply multiple URL parameters, an ampersand (&) is added between each parameter:

<scheme>://<yourPortalUrl>/apps/opsdashboard/index.html#/<id>?param=value&param2=value2

In the dashboard below, two parameters are used to display cities that are provincial capitals and have a population of 2 million or more.

https://www.arcgis.com/apps/opsdashboard/index.html#/558f846d67f749afa7f9f9080e31786e?pop=2000000&status=provincial%20capital

World Cities Dashboard showing provincial capitals with a population of 2 million or greater

Notice the parameter order in the URL does not affect the output result.

Sidebar: For the status parameter, the value “provincial capital” had a syntax of “provincial%20capital”. The “%20” was inserted between provincial and capital to denote a blank space. This special formatting is needed because of URL encoding requirements.

More ways to use URL parameters

Using URL parameters is not just limited to filtering layers. Operations Dashboard supports 5 types of parameters: Category, Numeric, Date, Feature, and Geometry. Each parameter type supports one or more actions. The action types available are: filter, set extent, flash location, zoom, pan, show popup and follow feature.

Let’s look at how a geometry URL parameter can be used. Geometry parameters can be configured in two ways: as a point location or as a spatial extent. Below, a spatial extent that defines the southeast Asia region is added to the URL:

https://www.arcgis.com/apps/opsdashboard/index.html#/558f846d67f749afa7f9f9080e31786e?extent=68.1,-11.8,164.1,46.5

World Cities Dashboard with a geometry filter, spatial extent of southeast Asia

In this case, the URL syntax “?extent=68.1,-11.8,164.1,46.5” means the following:

Since the URL parameter defined a new spatial extent for the map element, filters are also applied to the two indicator and list elements.

How to configure URL parameters

URL parameters are added to a dashboard when it’s being authored. A new URL Parameters tab has been added to the Dashboard Settings dialog. On this tab, you select the type of parameter you want to add and then you configure its properties. This process is similar to the way you configure other dashboard actions. The image below shows the URL parameter configuration settings used in the geometry example above.

Dashboard Settings - URL Parameters tab

As noted earlier, a common use case for using URL parameters is when a Dashboard is embedded within another application or web page. The hosting app or web page can change the default Dashboard display using URL parameters. Below is a simple story map that illustrates this concept.

Sidebar: To interact with the Dashboard in the story map, click the Explore button in the lower right corner.

Learn more

To learn more about URL parameters in Dashboards, see these two help topics:

To learn more about using Operations Dashboard for ArcGIS, see these resources:

Sincerely,
The Operations Dashboard for ArcGIS Dev team

About the author

Derek is a Senior Product Manager working on ArcGIS Monitor. Based in the Esri Redlands, CA office, he's involved with requirements gathering, software development, and product marketing. Follow on Twitter/X: @GIS_Bandit | Mastodon: https://mastodon.world/@GIS_Bandit ) Bluesky: https://bsky.app/profile/gisbandit.bsky.social

Connect:

Next Article

Your Living Atlas Questions Answered

Read this article