Soracom Lagoon
Map Panel
The Map Panel displays a map with a series of data points based on their corresponding geographic coordinates. The series can simply be a static collection of data, such as reading the latest value of a collection of sensors that are distributed geographically, or it can be time-bound, such as tracking the geographic location of a device as it moves around.
For each data series, you can select an additional value, such as temperature
, humidity
, signal
, or other numerical value, and configure the marker on the map to change based on the reported value, such as changing the marker color or displaying custom icons.
Compared to Worldmap Panel
The Worldmap Panel is a legacy panel with a number of limitations that is maintained for users who have developed dashboards on older versions of Lagoon. As the map panel provides greater flexibility in configuring the look and feel of the map and its markers, we recommend users to develop maps for their Lagoon dashboards using the Map Panel instead.
Creating a Map Panel
-
Click the
Add panel button at the top of the dashboard.
-
From the list of available panels, select Soracom Map Panel.
The map panel will be added to your dashboard.
Editing Panel Settings
To edit the map panel settings, click the Panel Title, then select Edit.
General
The General tab lets you configure basic panel settings. Refer to the Lagoon Panels: General documentation for more information.
Metrics
The Metrics tab lets you configure the data series source. Refer to the Lagoon Panels: Metrics documentation for more information.
Unlike other panels, with the map panel you must add a metric using a Map query. After selecting a device or group to display on the map, you must select the data attributes which correspond to Latitude and Longitude.
For example, if your device sends data to Harvest Data using the following format:
{
"lat": 27.9881,
"lon": 86.9250,
"temp": 23.7,
"humid": 0.75,
// ...other data
}
Then your metric should be configured as:
- Latitude -
lat
- Longitude -
lon
The other data values, such as temp
and humid
, will be available in the Map Options section.
Map Options
The Map Options tab lets you configure basic map settings and individual marker series settings.
Map Visual Options
- Map Provider - Select the provider to use for the base map. This allows you to change the look and feel of the map itself, as well as selecting between maps that show political boundaries or topographic features.
- Fit Map to Markers - Automatically zoom the map so that markers fill the map view.
- Center - When the Fit Map to Markers option is disabled, this option specifies the coordinates to use as the center of the map. You can select from a number of preset options for different regions of the world, or provide your own custom coordinates.
- Initial Zoom - The zoom level of the map when it is first loaded. Any integer value between
1
(fully zoomed out) and18
(fully zoomed in) is allowed. Note: some map providers may not have map data at all zoom levels. - Mouse Wheel Zoom - When enabled, the mouse wheel will control the map zoom when hovering over the map. Disable to prevent accidentally zooming in or out when scrolling through a dashboard.
Query Options
- Most Recent Only - When enabled, only the most recent data point for the query will be displayed on the map. This can be useful if you have multiple data series (for example, from multiple devices), and only want to show the most recent location of each series.
- Value Key - The attribute to use for rendering the marker, such as
battery
ortemperature
. - Threshold - Two numbers which define thresholds between low, medium, and high value ranges:
- When the metric value is below the first number, the first color will be applied to the circle, or the "low" image will be displayed.
- When the metric value is between the first and second number, the second color will be applied to the circle, or the "medium" image will be displayed.
- When the metric value is above the second number, the third color will be applied to the circle, or the "high" image will be displayed.
- Show Line - Shows or hides a line connecting each marker. This option can be used to "connect the dots" and visualize the progression of movement over time. When enabled, the following options are also available for controlling the line style:
- Colors - The colors used to render a dashed line. To render a solid line, simply select the same color for both options.
- Animated - When enabled, the dashed line will be animated. This option can be used to visualize the direction of movement from an older location to a newer location.
- Custom Icons? - Enables or disables displaying an image at the marker location instead of a circle. When enabled, the following options are also available for controlling the icons:
- Size - The size of the icon. Images that are smaller or larger than this size will be resized accordingly.
- Low Image URL - The URL of the image you want to use as the "low" value image.
- Medium Image URL - The URL of the image you want to use as the "medium" value image.
- High Image URL - The URL of the image you want to use as the "high" value image.
Hide Series
- With only nulls - If a data series does not contain any data, hide it.
- With only zeros - If a data series only contains values equal to 0, hide it.
GeoJSON - You can use this setting to add custom markers to the map panel. The data should be provided in GeoJSON format ( RFC 7946 ).
Time Range
The Time Range tab lets you adjust the range of data to use. Refer to the Lagoon Panels: Time Range documentation for more information.