Map Widget
Quick-Start and Reference to the Datacake Map Widget

Introduction

The Datacake Dashboard Editor features a widget to show one or many positions, including the option to show historical routes and interactivity.

Working with Maps

In order to start with a map widget, you need to add it to a dashboard. The map widget works like mostly all of the widgets on both device and workspace dashboards.

Placing a Map

Bring your dashboard editor into edit mode and add a new widget. This will open up the widget picker and in here you select the "Map" widget type.
This will add the widget to the dashboard and it will open up the widget editor.

Geolocation Data

Map Widgets only support database fields of the type "Geolocation". Most of your devices do have a location field available. If you want to learn more about geolocation data types please head over to the database section of this documentation.

Adding Data

There are two ways how you can feed geolocation data to the map widget:
  1. 1.
    Manually by selecting (device and) geolocation field.
  2. 2.
    Automatically by including all devices on the current workspace.

Manually

The following is valid for both device and global workspace dashboards.

Add Fields

If you are working with the map widget on a dashboard of a single device then you want to simply select one or more fields to be shown on the map.
The "Data" section of the map widget editor has a button to add fields as the data source for that widget.
Clicking this button will add a new data source entry where you can select the field you want to display. The field has to be of type "Geolocation".

Add Devices

If you are working with the map widget on a global workspace dashboard then you first of all have to select the device first and then the field of that particular device.

Auto-Add Devices

You don't have to manually add devices to a map widget. Let it happen automatically!
You can set the Map Widget to automatically add all devices from your workspace to the widget and optionally, set a tag filter that will only add devices that belong to one or more specific tags.
To enable automated adding of devices simply enable the "Use all devices from workspace" option.
This option automatically adds all devices of a workspace to the widget if these devices:
  • Have at least one geolocation field.
  • If there is more than one geo-location field, the first one from the field list will be used (this is usually the first one created).

Save and Reload the Dashboard

If you have recreated the dashboard as well as newly added a map widget and then enabled the "All Devices in Workspace" option, then you need to add the widget to the dashboard once by saving the editor and then also exit the edit mode of the dashboard (so that it is saved) as well as reload the dashboard once.
Caching is enabled for the dashboards on Datacake and in order for it to build up properly, the above procedure must, unfortunately, be performed once at this time.

Tag Filter

You can set a tag filter on the map widget as well so that it automatically adds all devices with a geolocation field that belong to either any or all of the selected tags.

Clustering

Clustering groups points on the map that are close to each other into a group. An indicator in the form of a number shows the number of device points within a cluster.
When you click on a cluster, the map automatically zooms into that cluster and shows all the points.

Disable Clustering

Clustering is enabled by default but if your use case requires deactivating it you can do it by simply enabling the "Disable Clustering" option.

Set Colors

On the map, the clustering is shown in form of a black circle with white text. You can override the colors by setting your own text and background color.

Appearance

The Appearance section allows you to control behavior and override default settings such as colors or set a different icon.

Colors and Icon

Under the "Appearance" tab on the map widget editor, you can override the default settings for color and icon.

Tint Color

Colorizes the widget itself. It's currently not yet available on the map widget.

Highlight Color

Changes the color of the map widget title.

Text Color

This sets the color of the text that is used to show the device name on the map. Could be set to white if using a dark map style.

Icon Color

Overrides the default black color for icons on the map.

Icon

Use a picker to select a different icon.

Map Styles

On the Appearance section, you can select the various available map stylings. You can switch between:
  • Light, Dark
  • Basic, Outdoor
  • Satellite

Full Height Maps

Sometimes you just want to have a single map on a dashboard, and you may want to display it in fullscreen on a wide variety of screen sizes.
However, since our dashboard designer is grid-based, this is not directly possible, as the grids represent an absolute height. Even if you place and scale the widget on the grid in a way that it fully extends to the bottom of your screen, it won't do that on a different screen.
To work around this we have added an option to the map widget that allows you to have the map widget automatically scale to the bottom of the browser window.
In the Appearance section on the map widget settings, you can find an option called "Use full screen height".
After enabling this option and exiting the edit mode of the dashboard editor, the map widget will autoscale to the bottom of the available screen size and/or browser window.

Placing additional Widgets

You just have to make sure that no other widget is below the map widget. They would stay in their position and be overdrawn by the automatically scaling map widget.
Placing Widgets above, left, or right next to the map widget is no problem.
When you click on a device on a map, the so-called sidebar menu shows on the right side of the browser window.

Editing Sidebar Dashboards

For the display of the sidebar dashboard, we use the mobile dashboard layout of a device. This means that you can create or customize the Sidebar Dashboard yourself.
To do this, you have to activate the edit mode of the dashboard in your device and activate the mobile layout.
If you share your global workspace dashboards with others and you want to use the sidebar dashboard feature, you have to enable this first.
To do so, please access the "Appearance" view using the tab bar on the widget editor and enable the option "Show Device Details on Public Dashboard" just as shown in the following screenshot.

Historical Data

The map widget allows you to show historical geolocation data in the form of "routes". You can enable this setting also in the map widget editor.

Enabling Historical Data

In order to show the route of a device on the map widget, you have to enable this in the map widget editor.
On the "Timeframe" tab you simply enable the "Show historical data" option. This will unfold a time frame picker and you only need to select one of the available time frame presets.

Time Frame Options

Depending on your needs we do have some time frame presets available, for example:
  • Hour for routes within the last 60 minutes, with a resolution of 1 minute.
  • Day for routes within the last 24 hours, with a resolution of 15 minutes.
  • And so on

High-Resolution Routes

If you select one of our presets we define the number of data points shown on the map, so for example if you select "Day" as a time frame preset we only show a new data point on the map when 15 minutes have passed to the previous one. This can lead to the fact that we are skipping important route points.
To manually override the resolution parameter please first select a time frame preset and additionally click on "custom". This will open up an editor where you can set the resolution down to as low as 1 minute.