Skip to main content
Map Interactions - Visual Tooltip
Astrato Support avatar
Written by Astrato Support
Updated over 2 months ago

Introduction

Tooltips help users learn about the context of the map display. They can also give users extra information about a data point, help them read the map, and make data-related decisions.

A visual tooltip is added to the map in Astrato by combining the map interaction with Astrato's actions.



Build the Visual Tooltip

The visual tooltip is built by creating a group of Astrato visualizations that contain information about a data point in the map's point layer.


The objects can include any visualization from Astrato.

The Visualtool tip should also include a button that will be used to hide the tooltip.

To connect the tooltip to the map interactions, we add a filter that looks at each object.
Like the image below.

The Field defined in the filter should be the same field used as the dimension in the map layer (in this example, Activity ID).

The value to compare should be an Astrato variable (in our example vAcitivtyID)

The variable value will be set through map interactions.

Note: the visual tooltip needs to be higher than the map in the layer definition of the sheet.

Map Interactions settings.

An action block is needed to connect the visual tooltip to the map.

  • Building the show tooltip action block.

    • Add a When control from the controls session.

    • Add a Set Variable action and event parameter action to set the variable value
      The variable used is the variable used to filter the tooltip object.
      From the options in the event parameter action, select the Dimension value .
      This action will filter the tooltip content to the point in the map.

    • Add a set object property action from the objects section in the menu.
      Select the tooltip (map_toolTip in the example) object and set the visibility to true.

      This action will display the tooltip on the map.

    • Add another set object property action and select the position and top property.
      Use another event parameter action to set the value.
      This action will position the tooltip near the point hovered on the map.

  • Building the hide tooltip action block

    • Add a when control, select the button in the tooltip, and select the one-click option.

    • Add a set object property action, select the tooltip, and set the visibility property to False.

Maximizing the map

The map and the tooltip should be grouped together to maximize the map and show the tooltip.

Did this answer your question?