Measurement Module

This module can be partially configured using Manager. For instructions, see Tool Behavior.

The Measurement Module implements the ability to measure distances and areas on the map.

For a user to be able to perform measurements, you must add one or more measurement tools to the toolbar. Alternatively, you could add measurement tasks to the I Want To menu or create workflows that prompt the user to perform a measurement. The HTML5 Viewer provides a set of commonly-used measurement tools that you can add to the toolbar.

Measurement tools (top), and Advanced Measurement tools (bottom) in the Desktop and Tablet interfaces

Measurement tools (left), and Advanced Measurement tools (right) in the Handheld interface

Measurement Tools

You can add measurement tools to a viewer's toolbar from the Toolbar page in Manager. There are two measurement tool groups that you can activate:

Edit Measurement Drawings

The capability to include and provide editing of measurement drawings on a map tip is dependent on enabled set to true on the GraphicsLayerIdentifyProvider in the configuration of the Identify module. If enabled is set to false, the edit capability is not available.

When a user adds a measurement drawing to the map and then clicks the drawing, it is automatically placed in edit mode. The edit handles for the drawing are visible, and the map tip opens. The map tip includes the dimensions for the associated drawing.

 

Area drawing on a map

 

Area drawing in edit mode

When the user changes the length or shape of the drawing on the map, the dimensions change in the map tip.

 

Dimensions changed in the map tip

 

Dimensions shown on the drawing

For information about editing the drawing on the map, changing its styles, and editing drawings that are overlaid, see Edit Drawings on the Map.

Note that drawings and measurement drawings are included in the results of an identify operation.

Measurement Editing Tools

To add measurement editing tools, you can add the Edit Drawings tool group:

If the Edit tool is selected, the Erase and Clear tools can be activated. These tools apply to both drawings and measurements.

With the Edit tool activated, the Erase, and Clear tools become available

Note that using Erase on drawings that overlay each other results in erasing all of the drawings. To avoid this behavior, the user can click the graphic to open the map tip, select the drawing to be deleted from the drop down list, and click Delete.

Measurement and Markup

When the user performs a measurement, the segment, perimeter, or area measurements display as markup on the map. The Measurement Module and the Markup Module are integrated so that measurement markup can be edited and styled like other markup.

When the user edits the length or area of measurement markup, the measurements are recalculated and adjusted on the map and in the map tip.

Measurements recalculated after the user changes the markup area

Measurement Data and the Results Table

You can configure viewers to show measurement data in the Results Table as well as on the map. See the setup procedure for instructions. The Results Table provides an easy-to-read presentation of measurement data. In addition:

The Results Table opens when the user completes the first measurement. Each measurement appears on a new tab. If the measurement shape is made up of straight lines, the table contains one line for each segment of the measurement.

When the user selects a row in the table, the map pans to the shape that the row represents. It highlights the shape on the map and opens a map tip containing the data from that row.

Measurement data in the Results Table

Measurement map tips and layer map tips get the header and main content from different sources. Measurement map tips get their content from the measurements, not from the layer configuration. Both types of map tip use the same footer configuration. For more information, see MapTips Module.

The user can export the measurement data to a file by selecting the Export Results option in the Panel Actions Menu, provided the Menu Module's ResultsTableActions has at least one export item configured. See Menu Module for more information.

To show measurement results in the Results Table:

  1. In a text editor or XML editor, open one of the viewer configuration files—Desktop.json.js or Tablet.json.js.

    By default, the configuration files are stored in the Sites folder:

    Sites\[site]\Viewers\[viewer]\VirtualDirectory\Resources\Config\Default

  2. Find the Measurement property in the Results Module's resultMappings.

      ...
      {
        "moduleName": "Results",
        "moduleType": "geocortex.essentialsHtmlViewer.mapping.infrastructure.results.ResultsModule",
        "libraryId": "Mapping.Infrastructure",
        "configuration": {
          "resultMappings": {
            ...
            "Measurement": [],
            ...
  3. Set the Measurement property to ShowResultsTable.

            "Measurement": ["ShowResultsTable"],
  4. Save the file.

  5. Repeat these steps for the other configuration file.

Measurement Projection

You can configure measurement projection settings from the Tool Behavior page in Manager or by setting the Measurement Module's configuration properties in the viewer configuration files. For more information about the Tool Behavior settings, see Tool Behavior.

Measurement settings in the Tool Behavior section of the Management Pack

By default, projection is disabled. This setting only applies if the Calculation Type setting is set to Planar. If it is set to Geodesic or PreserveShape but measurementProjectionWkid is specified in the viewer configuration files, the viewer overrides the set calculation type and uses Planar.

If no measurement projection WKID is specified, the measurement calculation is done in the current spatial reference of the map. If no measurement projection WKID and no calculation type is specified, the viewer uses the geodesic calculation type, which does not require a WKID.

Configuration Properties

Module

Views

View Models

© 2019 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 4.12