Traffic Light Map Widget

<< Click to Display Table of Contents >>

Navigation:  Enterprise > Widgets >

Traffic Light Map Widget

The Traffic Light Map widget allows the user to display a map using Esri ArcGIS API for JavaScript (JS). Please review the ArcGIS API licensing information before using this widget.

 

Esri JS API Requirements: 4.17 (https://js.arcgis.com/4.17)

 

 

Widget Interface

 

The Traffic Light Map widget displays good/bad summary data from a report. This widget shows report data as four states: Alert (Ent-Traffic_Light_Widget_Alert-Icon), Warning (Ent-Traffic_Light_Widget_Warning_Icon), OK (Ent-Traffic_Light_Widget_OK_Icon), and Unknown (Ent-Traffic_Light_Widget_Unknown_Icon). This widget is normally used for analyte exceedances, but can be used for any other type of data by configuring the conditions for each of the breaks.

Ent-Traffic_Light_Map_Widget-Sample

 

The Traffic Light Map widget has the following functions in the user interface that can be set within the User Interface tab in the widget properties:

Zoom In and Zoom Out – Although the default view extents for the map can be set, the user can always change how much of the map is displayed. Click either the Zoom In (Ent-Map_Zoom_In-Icon) or Zoom Out (Ent-Map_Zoom_Out-Icon) buttons to view the page as needed. These buttons are located on the top-left of the widget. Users can also zoom in and out by using the scroll button on the mouse.

Fullscreen – Click the Enter Fullscreen Ent-Map_Widget_Full_Screen_Button button to expand the map to the extent of the user's screen. Selecting the button again, hitting escape on the keyboard, or hitting F11 on the keyboard will return the map to the original size of the widget.

Basemap Gallery – A variety of map types are available within Enterprise. Select the Basemap Gallery Ent-Map_Widget_Basemap_Gallery_Button button to open the drop-down selection of map types. The current options are ArcGIS defaults types. Click on the CollapseEnt-Map_Collapse_icon2 icon to close the drop-down menu. The default basemaps are stored in the ST_CONFIG table. Acceptable entries for the default basemaps are as follows:

Basemap Gallery Name

ST_CONFIG Table Entry

Imagery

satellite

Imagery with Labels

hybrid

Streets

streets

Topographic

topo

Dark Gray Canvas

dark-gray

Light Gray Canvas

gray

National Geographic

national-geographic

Terrain with Labels

terrain

Oceans

oceans

OpenStreetMap

osm

USA Topo Maps

topo-vector

USGS National Map

streets-relief-vector

Legend – When a layer is added to the map, the Expand LegendEnt-Map_Widget_Legend_Button button can be selected to view a drop-down list of map symbols. Click on the CollapseEnt-Map_Collapse_icon2 icon to close the drop-down menu.

 

 

Widget Properties

 

The Traffic Light Map widget is empty when added to a dashboard and must be configured to show report results. The editor for this widget allows the user to select a report, and then configure the widget appearance. To add data (select a report) or change properties of this widget, open the Widget Editor by selecting the More Options Ent-More_Options-Icon icon in the upper right corner of the widget to display the drop-down menu and then select the Edit menu option. The widget properties are divided into three tabs: General, Extents, and User Interface.

Ent-Traffic-Light-Map_Widget_Editor_General

Widget Title – By default, the widget title is Traffic Light Map . The title can be modified.

Widget Color – The color of the widget can be changed using the Change Widget ThemeEnt-Theme_Color_Iconicon to the left of the widget title.

Widget Object Editor – To set various appearance properties of the widget, select the Object Editor Ent-Widget-Editor_Properties icon in the widget header to open the Widget Object Editor. See the Widget Editor article for more details.

Cancel – Select the Close without Saving Ent-Close_icon button to exit the Widget Editor without saving changes.

Save – Changes will be applied to the widget by clicking on the Save Ent-Widget_Save-Icon button. The Widget Editor screen will close after the save operation is complete.

Help – The Help Ent-Help-Icon button connects to the online documentation related to the specific widget.

 

 

General Tab

 

The properties for this widget are the same as those in the Traffic Light widget, with the following exceptions:

Sort Column – Select which column will be used to sort the results. If the results are not sorted, the displayed feature will be the last result in the report output for the specific location. Many EQuIS reports, such as Analytical Results II and Action Level Exceedance II, have a default report sort order based on date in ascending order (newest results at the bottom of the report output).

Sort Order – Allows for sorting results in ascending (largest values on top) or descending (smallest value on top) order.

Tooltip Template – Sets the template for the tooltip, which is shown when a user clicks on an icon. The template can make use of the report columns in the following way: ${SYS_LOC_CODE}: ${REPORT_RESULT_VALUE}, or ${SYS_LOC_CODE}-${REPORT_RESULT_VALUE}. The column name must be enclosed in { }.

Example: ${SYS_LOC_CODE} - ${REPORT_RESULT_VALUE} - ${REPORT_RESULT_UNIT}

 

Additional formatting options are available in the ArcGIS API for JavaScript. For example, the user could format a date column as follows:

${sample_date:DateFormat(datePattern:'yyyy-mm-dd',selector:'date')}

 

Icon Size (pixels) – Defines size of traffic light icons displaying in the widget.

 

Show Unique Features Only – When checked, results in only one feature per location being displayed. When unchecked, all the report data are displayed, with the traffic light icon for the last feature for each location on top. This feature works with the Sort Column and Sort Order properties if they are set. By default, the check box is checked. The display order of the pop-up content is not guaranteed when "show unique features" is unchecked.

 

In the example below, the Show unique features only option is checked and only one feature is displayed per location. With the same report and the Show unique features only option unchecked, there would be 6 results for the selected location.

Ent-Traffic-Light-Map_Unique-Features-Example

 

 

Extents Tab

This tab sets the default extent for the widget. The options are:

Application Default – Refers to the value set in ST_CONFIG.

Selected Report – Refers to the calculated extent of the report used in the widget.

Custom Extent – JSON string defining an extent object. Example: { "xmin": -81.435, "ymin": 39.3, "xmax": -77.0, "ymax": 41.7, "spatialReference": { "wkid": 4326 } }.

 

 

User Interface Tab

This tab lets the user customize the visibility and location for the display of the legend, basemap gallery, and fullscreen mode.