Enabling Diagnostics for Aiding OMA and Flex Configuration
The map has diagnostic and configuration capabilities built into it that can be enabled to assist with map configuration tasks. In Flex, with the Flex diagnostics capabilities enabled this can be accessed by using the Show Diagnostics Panel option under the Map's View menu. For OMA, these must be enabled by adding the "devMapDiagnostics=true" URL parameter to OMA when running in a browser. Then the diagnostics panel can be shown by toggling on the "Show Diagnostics Panel" option of the map settings.
Within the diagnostics panel you have three tabs:
Selection: Various capabilities for inspecting and adjusting properties of the selected map features, which will be described in more detail below.
Configuration: Within Flex or Java CNV this allows configuration to be applied immediately to the map without restarting the client. This is described in more detail below
Settings: Allows inspection and direct modification of the current settings of the map, allowing setting dependent configuration to be tested before the UI elements for modifying the map settings have been added.
Configuration Tab
Within Flex or Java CNV this tab should be used when developing and testing configuration. The simplest way to do this is to edit the configuration files in the usual way using WinSCP/VSCode and then clicking the Reload Config button once the files are saved.
Likewise for SVG file changes, these can be applied using the Reload Images button once the files are saved to the server.
Notes:
The Reload Config and Reload Images are only available when running Flex using the ?config=<config folder> URL parameter, or within the Java CNV if the config folder has been set in the Configuration Folder setting at the top of this tab.
For OMA development, configuration changes can be made and saved in VSCode and they will be automatically reloaded and applied in the map.
Selection Tab
Within the selection tab there are various modes -
Basic: Shows the basic attributes of the selected feature, useful for seeing the most commonly useful data which might be used in map configuration
Edit: Allows some of the basic data of a feature to be edited, useful for testing different variations of feature types without finding an example of each to select and view
Debug Styles: Allows debugging of feature rendering, useful for evaluating how a features filtering, render style and declutter has been calculated and applied from the configuration. This is covered in more detail below.
Debug Expressions: Allows debugging of expressions used in the map configuration. This can be useful if you are unsure why a given expression is arriving at a given result.
Symbol: Allows tweaking of symbol parameters such as:
Hitbox (the area of the symbol that is sensitive to mouse/touch).
Whether it is a circular symbol - this affects the hitbox and the selection highlighting.
Whether the selection highlighting should surround the entire symbol or just the area defined by the hitbox.
Whether conditions should be placed around the entire symbol or just the area defined by the hitbox.
Once the settings are tweaked to the desired end result the definition can be copy and pasted into the configuration.
Draw: Shows draw related data of the selected feature, such as the render style
Raw Data: Shows the full raw data of the selected feature
Debug Styles
The debug styles section is the most important section in the Selection tab, allowing the evaluation of the filtering and styles for a selected map feature, and the application of any dynamic styling to its SVG symbol, to be examined in detail.
At the top there are the following checkboxes:
Show Hidden: Forces the map to show features which are currently hidden by filtering or styling, so that they can be selected and debugged in this tab.
No Rotation: Disables rotation of SVG symbols.
Frame 2: 2 frame animation is supported, allowing symbols to alternate between 2 states, for example to attract attention to devices in dangerous states. When debugging the styling of symbols using this animation this checkbox can be checked to force the style debugging to debug the style for frame 2, otherwise it will always show the style debugging for frame 1.
Interaction: This allows the debugging of styles that would be applied when the user is interacting with the feature (the feature is selected or the mouse is hovered over it).
The debug output below that consists of a number of sections, most of which have expandable sections which can be clicked to reveal or hide more detail.
Debugging Feature: Basic attributes of the feature being debugged.
Initial Feature Style: The default style values of the feature, before any dynamic styles are applied.
Global Settings: The current global settings being used by the styling, such as zoom level, map settings or configuration (which is not shown in the output as it would be too large).
NMS Line Width: Information related to the evaluation of the NMS line width configuration, and instructions on migrating it from symbology_state table to JSONC configuration, if applicable.
NMS Class: Information related to the NMS class of the selected object, including parent and child class lists.
NMS Filtering: Information related to the NMS specific class, condition and rank filter evaluation.
Style Calculations: A hierarchical depiction of the evaluation of the styles, which ones were applied and what properties were applied by each.
Final Style: The final style properties applied to the feature after all of the style calculations above.
Active Declutter Checks: An evaluation of the all the active declutter checks (those that are currently enabled).
Debug SVG Styling of Image: If the associated SVG file for a symbol is being dynamically styled then this section will be included showing the evaluation of the rules for each element in the SVG - what styles were applied and whether the element was hidden.
Note: If an element didn't match any rules it will be grayed out.