Map Module

The Map Module manages the map and map-related events.

Visual Feedback when Clicking a Map

A built-in default provides a visual cue to indicate where the user clicked in the map when no other tool is active.

The visual cue is a faint ripple effect, which is followed immediately by the appropriate map action for the clicked target. For example, when a user clicks a map feature. the ripple effect occurs, a pushpin appears on the target, the target in focus is highlighted in blue, and a map tip opens.

 

Ripple effect on a map (left image) followed by a pushpin and focus highlighting on the target (right image)

Configuration Properties

Module

Views

View Models

Example - Add a Command with a Parameter to a Behavior

The following example demonstrates adding a new command with a parameter to the behavior MapOnFeatureClickBehavior.

To add a command with a parameter to a behavior:

  1. Run an XML editor or text editor as an administrator.

  2. Open one of the viewer configuration files, Desktop.json.js, Tablet.json.js, or Handheld.json.js, in the editor.

    By default, the configuration files are here:

    C:\Program Files (x86)\Latitude Geographics\Geocortex Essentials\[instance]\REST Elements\Sites\[site]\Viewers\[viewer]\VirtualDirectory\Resources\Config\Default\

  3. In the Map module section, find the behaviors property. Locate the behavior you want to edit, for example, MapOnFeatureClickBehavior.

    {
        "moduleName": "Map",
        ...
        "configuration": {
            ...
            "behaviors": [
                ...
                {   
                    "name": "MapOnFeatureClickBehavior",
                    "commands": [
                        "ShowMapTip"
                    ]
                }
            ]
        },
        ...
    }

    The behavior executes a single command: ShowMapTip.

  4. Refer to Viewer Commands and Events to determine the type of parameter that is associated with this command. ShowMapTip has a parameter of type, geocortex.essentialsHtmlViewer.mapping.infrastructure.Feature.

  5. Find a command that you want to add to the behavior that has the same parameter type. For example, ZoomToFeature.

  6. Add the desired command to the list of commands, separated by a comma. For example:

    "commands": [
        "ShowMapTip",
        "ZoomToFeature"
    ]
  7. Save the file.

See Also...

ZoomControl Module

© 2019 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 4.11