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:
- Business and Commercial Dashboards
- 311 Citizen Request Dashboards
- Real Estate Development Dashboards
- Opioid Epidemic Dashboards
- Bird Count Volunteer Crowdsource Dashboards
- Iowa DOT Winter Operations Dashboard
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:
The dashboard’s default URL is:
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:
Here’s what the dashboard looks like with this URL parameter:
Note the syntax “?pop=10000000” means the following:
- ? → Append a parameter to the URL
- pop → The name given to the parameter
- 10000000 → The parameter’s value
A URL parameter always consists of a “name=value” pair. The generalized syntax for a dashboard URL is:
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:
In the dashboard below, two parameters are used to display cities that are provincial capitals and have a population of 2 million or more.
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:
In this case, the URL syntax “?extent=68.1,-11.8,164.1,46.5” means the following:
- ? → Append parameter to the URL
- extent → The name given to the parameter
- 68.1 → Left x value
- -11.8 → Left y value
- 164.1 → Right x value
- 46.5 → Right y value
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.
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.
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:
- Operations Dashboard for ArcGIS: An Introduction Esri UC 2018 Tech Session – 1 hour video
- Real-Time Decision Making with Operations Dashboard for ArcGIS – 1 hour webinar
- Configure your first dashboard – blog
- How to Create a Simple Real-Time Dashboard – blog
- How Did They Make That Dashboard? – blog
The Operations Dashboard for ArcGIS Dev team