Embed a map template in a Workshop module

Map templates can be embedded in Workshop modules. Their parameter values can be passed directly from Workshop variables.

There are three steps to embed a map template in a Workshop module:

  1. Add a Map Application Template widget in Workshop
  2. Choose a resource
  3. Configure the widget

Add a Map Application Template widget in Workshop

In a section of your choice in the Workshop module, click the + icon or + Add widget to open the widget menu, and search for the Map Application Template widget.

Adding the Map Application Template widget

Choose a resource

In the widget editor, click Select to see a list of compatible resources and choose the map template resource you want to embed.

Configure the widget

For the Map Application Template widget, the core configuration options are the following:

  • Input
    • Resource: Choose the map template resource to embed. Optionally provide a Override map RID. If defined, this map will be displayed instead of the default behavior of generating a map using the template and its parameters. This allows, for example, loading an existing map from a RID saved in a property on an object.
    • Parameters: Supply values for template parameters using Workshop variables.
    • Refresh key: Whenever this variable's value changes, the widget will perform a complete reload of the map.
    • Load data from scenario: Load the given resource using a scenario instead of the base Ontology.
    • Regenerate map after applying scenario: When set, the map will be refreshed after each scenario modification.
  • Interaction
    • Selected objects: Output an object set of the currently selected object(s). This object set can then be used in downstream widgets within the current module.
    • On selected objects change: Configure Workshop events to trigger when the selected objects on the map change (for example, the trigger could open a drawer with a more detailed view of the selected objects).
    • On selected action application: Configure Workshop events to trigger when any action is successfully applied within the widget.
    • Drawn shape: Output a GeoJSON geometry collection of the shape being drawn by the user.
    • On drawn shape: Configure Workshop events to trigger when a shape is drawn in the map.
    • All visible objects on map: Output an object set of the visible objects in the current map.
    • Available actions: Controls the actions that will be available for submission from the widget. Choose the Some option to manually specify the available actions, along with an action config that can leverage module variables as default parameter values.
    • Zoom to object set: Centers the map on the content of the given object set.
  • Capabilities
    • Filter rendered objects: When set, allow users to filter the displayed objects on the Map via an Object set filter variable.
    • Enable geo-spatial object search: Allow users to search the Ontology using a drawn shape.
    • Enable transition to full Map Application: Allow users to open the Map Application from the widget, using their current state.
    • Enable image export to clipboard: Allow users to export an image of the map to their clipboard.
    • Saving settings: Enable to allow the user to save the current map.
      • When the embedded resource is a map template, saving will create a new map resource.
        • This map will be given the name specified by Default resource name and be placed in the folder given by Default folder. If Show resource dialog is enabled, the user will be prompted to pick a resource name and location, with the configured name and folder being shown as a starting point in the resource dialog.
        • If a map is successfully created, the events and/or ontology Action defined in On create new map will be triggered. If you wish to use the created map RID as an input to an Action parameter, use the special Saved map RID option in the parameter input picker. Note that all required parameters must be configured with a defined default value, as no Action form will be shown to the user.
      • When the embedded resource is a map, saving will simply update the embedded map resource, rather than creating a new resource.
  • Time configuration
    • Selected time: Control the selected time, using a Workshop variable of type Timestamp or Date.
    • Time window: Control the time window, using two Workshop variables of type Timestamp or Date.
  • Interface
    • Toolbar: Display the toolbar.
    • Legends & search panel: Display the layers and search panel on the left.
      • Enable minimal legend: Display a legend that is smaller in size and that is placed in the bottom-right when possible
      • Base layer picker: Let users choose other base layers through a button under the Legends & search panel.
      • Histogram: Display the histogram, letting users filter the map by object type or properties.
    • Object selection panel: Display currently selected objects on the right.
    • Time configuration panel: Display the time scrubber on the right.
    • Series panel: Display the series panel on the bottom.
    • Incomplete inputs message: When a map template cannot run due to missing required inputs, this message is displayed to the user in a dialog.

Previously, template inputs were supplied using a single input object set variable that contained all the required object types defined in the map template. This is now discouraged as it only works for templates without non-object parameters and one object parameter per object type. If you wish to use this feature regardless, select the Use legacy input object set checkbox and supply an object set variable.