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 embedded template configuration options are as follows:

  • Layers
    • 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.
    • Base layer picker: Lets users choose other base layers using a button under the Legends & search panel.
    • 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
    • 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.
    • Enable geo-spatial object search: Allows users to search the Ontology using a drawn shape.
    • Enable splitting on antimeridian: Splits drawn shapes along the anti-meridian.
    • Selected objects: Output an object set of the currently selected object(s). This object set can then be used in downstream widgets in 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.
    • 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.
    • On selected action application: Configure Workshop events to trigger when any action is successfully applied within the widget.
  • Time configuration
    • Enable timeline: Display the timeline panel on the bottom.
    • 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
    • Legend: Display the legend panel on the left.
      • Collapse legend panel: Collapse the left panel.
    • Show toolbar: Display the toolbar.
    • Enable search around: Enable search arounds.
    • Enable advanced selection tools: Enable selection tools in the toolbar.
    • Show selection panel: Display currently selected objects on the right.
    • Show legend & search panel: Display the legend and layer 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
    • Show histogram: Display the histogram, letting users filter the map by object type or properties.
    • Show series panel: Display the series panel on the bottom.
    • Viewport auto zoom: Centers the map on the content of the given object set.
    • Incomplete inputs message: When a map template cannot run due to missing required inputs, this message is displayed to the user in a dialog.
    • 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.
    • Filter rendered objects: When set, allow users to filter the displayed objects on the Map via an Object set filter variable.
    • 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.

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.