Creating a Google Maps Object

Prev Next

This topic describes how to add a new Google Maps Object to a Screen or a Container and its specific properties.

Due to a Google Maps security content update, the Google Maps Objects will only work with versions 12.6 or newer. If you have any concerns regarding the Google Maps Object, please reach out to your Customer Success Manager.

To create a new map, you need to access a Screen in Design mode.

Once you're in the Screen editing page, locate the Google Maps Object  from the Screen Objects list in the left panel, and then drag and drop it onto your Screen or Container.

contents/assets/images/assets/images/add-google-maps.gif

When you create a Google Maps Object, it is initially empty. The next step is to configure a Layout that will define the data to be displayed in the map. To do so, click on the Object or select the Object and click the "Configure Layout" button (contents/assets/images/layout.png) located in the Properties Toolbar located vertically alongside the Properties panel to the right of the Screen.

contents/assets/images/assets/images/google-maps-config.png

See The Layout ObjectConfigure a Layout and About data blocks of a Layout for more details on the Layout Object.

The Google Maps Object requires a valid Google Maps API key (a unique alphanumeric string) that can be obtained following the official Google guidelines.

Once the API Key is created, Board Cloud customers will need to paste it in the "General settings" section of the Subscription Hub.

contents/assets/images/whats-new-release-notes/assets/images/General Settings Sub Hub.png

For on-premises installations, customers will need to paste their API key in the System Administration section of Board by clicking on the "General settings" tile.

contents/assets/images/whats-new-release-notes/assets/images/General Settings SysAdmin.png

The Google Maps Object, just like every other Object, can be moved, resized, duplicated via copy/paste, and easily aligned with other Objects on the Screen.

See Configure Screen Objects for more details.

Google Maps Object Layout

The Layout editor for Google Maps Object is slightly different from the classic one, in that it offers map-specific options and must contain specific Data Blocks for mapping.
The main elements that should be considered are highlighted in the image below:

contents/assets/images/assets/images/Google-Maps-Layout.png

The Data area

Geocoding can be achieved in two ways via Data Blocks:

  1. Using Latitude and Longitude Cubes (for Map Areas and Bubbles. See Object settings for more details)
  2. Using an Entity/Text Block whose members/text strings are mapped to IDs of SVG areas in a GeoJSON file (only for Map areas. See Object properties for more details)

Using Latitude and Longitude Cubes

  1. Add the Latitude and Longitude Cubes to the Data area of the Layout editor. These two Cubes must contain the geographic coordinates regarding members of the Entity added to the "Markers" field.
  2. Add an Entity to the "Markers" field: Data Cubes added to the Data area should also have this Entity (or another Entity from the same Relationships tree) in their structure.   

Example

You want to visualize data from your Net Sales Cube which is dimensioned by Day, Shipper, Product, and Branch.

The Branch hierarchy is the following:

contents/assets/images/assets/images/branch-hierarchy.png

  1. To plot your data in the Google Maps Object, add two different Cubes dimensioned by Branch to your Layout: one containing Latitude coordinates and the other one containing Longitude coordinates of each member of the Branch Entity

The following Data View shows those coordinates for each member of the Branch Entity.

contents/assets/images/assets/images/branch-lat-long.png

The following Layout definition will then visualize your data on the map, provided you have configured Bubbles and Map Areas in the Object settings area (see next paragraph for more info):

contents/assets/images/assets/images/Layout-Structure.png

As you can see in the example above, the "Branch" Entity is in the "Markers" field and all Cubes in the Layout have the Branch Entity in their structure.

Data Cubes must have in their structure the Entity added to the "Markers" field or another Entity from the same Relationships tree at any level of aggregation.
To obtain geographical data, you can use various online providers (free or paid) or enter those values yourself through data-entry actions in corresponding Cubes.

Using an Entity/Text Block

  1. Add an Entity/Text Block whose members/text strings are mapped to IDs of SVG areas in a GeoJSON file to the Layout
  2. Go to the Object settings area of the Layout and select the "Map Areas" menu. To access these settings, you must first enable the "Map Areas" toggle.
  3. Select the above Entity/Text Block from the "Shape name" dropdown under the "Map Areas" menu in the Object settings area of the Layout

The GeoJSON file must contain IDs and coordinates for each map area while the Entity/Text Block in the Layout must contain the same IDs as member codes (Entity) or text strings (Text Block).

Data Cubes added to the Data area should also have the Entity added to the "Markers" field - or another Entity in the same Relationships tree - in their structure

Example

You want to visualize data from your Net Sales Cube which is dimensioned by Day, Shipper, Product, and Branch.

The Branch hierarchy is the following:

contents/assets/images/assets/images/branch-hierarchy.png

  1. To plot your data in the Google Maps Object, add an Entity/Text Block containing the IDs of the SVG areas included in the GeoJSON file you want to use to your Layout
  2. Then you will need to map the Block containing the IDs to the GeoJSON file, from the "Map Areas" menu in the Object settings area
    Using an Entity, the Layout configuration should look as follows:
    contents/assets/images/assets/images/google-maps-mapping-entity.png
    The Branch Country Entity  contains the following members, whose code is also used to identify map areas in the GeoJSON file:
    contents/assets/images/assets/images/mapping-entity-json.png

Data Cubes must have the Entity added to the "Markers" field or another Entity from the same Relationship tree at any level of aggregation in their structure.

The Axes area

In the Axes area, you can add dimensions to define markers that will be used to plot bubbles in the map or to highlight map areas.

The Google Maps Object supports up to 2 Entities in the "Markers" field.
For geocoding using Latitude and Longitude to work correctly, the dimension (Entity) used in the structure of Latitude and Longitude Cubes must be added to the "Markers" field as well. See next paragraph for more info.
For geocoding using an Entity/Text Block whose members/text strings are mapped to IDs of SVG areas in a GeoJSON file, you need to include the Entity/Text Block in the Layout and select it in the "Shape name" dropdown under the "Map Areas" menu. See Object properties and Upload GeoJSON for more details.

Based on the numbers of Entities set in the "Markers" field, two scenarios may occur:

  1. Standard data set (single Entity). The value is shown in the marker form. The position is given by Longitude and Latitude Cubes
  2. Clustered data set (two Entities). Data points are clustered together in Bubbles, and relevant information related to the data point and the two Entities is displayed in a popover

Google Maps Object settings

In the Layout editor, under the Object settings area, the "Map areas" menu allows you to configure data visualization as a colored layer over relevant map areas.

Map areas

The configuration can be done  in two ways:

  • Latitude/Longitude. Use Latitude and Longitude Cubes. Add these Cubes to the Data area in order to select them from the dropdown menus under "Map areas"
  • Shape name. Map the Entity/Text Block to the ID of the SVG areas in the GeoJSON file via the "Shape name" field

Color

For both options, in the "Color" dropdown menu, you can select Blocks from the Layout and use them as drivers for the area's color, while the "Color opacity for data aggregation by" dropdown menu allows you to define a criterion that controls the color opacity.

The following examples show the two mapping options available.

contents/assets/images/assets/images/map-areas.png

contents/assets/images/assets/images/map-areas-2.png

If you select multiple Blocks in the "Color" dropdown list, they will also appear in the contextual menu (sliding toolbar) both in Design and Play mode under the "Shapes" dropdown list: from there, just select the Block you want to be used as driver for the map areas color.
 contents/assets/images/assets/images/gmaps-shapes.png

Bubbles

The "Bubbles" menu allows you to configure bubbles that will be plotted on the map using Latitude and Longitude Cubes in the Layout. You can also define which Blocks will be used as drivers for the Bubbles' radius and color.

contents/assets/images/assets/images/bubbles.png

You can configure the Bubbles color to change dynamically by setting a color alert on the corresponding Block. See Block settings for more details.
If both the Bubbles and Map areas option are enabled, setting a color alert on the Block that drives the color setting for both options will apply the alert settings to Bubbles and Map areas.
If you select multiple Blocks in the "Radius" and "Bubbles Color" dropdown lists, they will also appear in the contextual menu (sliding toolbar) both in Design and Play mode under the "Bubbles" dropdown list: from there, just select the Block you want to be used as driver for the Bubbles color and Radius (Value).
 contents/assets/images/assets/images/gmaps-bubbles.png