Available to PLUS and higher subscribers.
This widget displays GPS position data, and optionally additional synchronized datastream data on a map as a callout or/and a track overlay.
The displayed time period, zoom, map style, and track overlay (when enabled) can be configured by the user. Only one map widget can be added per device template.
Callouts can be configured to display additional datastream values posted at the same time as the GPS data.
Track overlays allow datastream values that approximately correspond to the location datastream timestamp to be visualized on the GPS track. E.g. speed of the device along the track.
Before creating a map widget, you need to create a Location Datastream, and in order to visualize the data you will need to write location values to the datastream.
The map widget requires the use of a Location Datastream. Create a location datastream by editing a template, select ‘Datastreams’ tab, click on ‘+ New Datastream’, and select the option ‘Location’. Max one location datastream per template.
Assign a virtual pin to the location datastream, and a default longitude and latitude positions in decimal degrees under ‘DEFAULT COORDINATES (LON/LAT)’. The advanced setting ‘Show in Service Charts’ will make this DS available in the list of datastreams in Custom chart (which is often used as a service chart).
After the location datastream is created, a pair of GPS longitude/latitude values need to be written to the location datastream from either an IoT device, or via HTTPS API.
Blynk.virtualWrite(V5, longitude, latitude);
In order to include datastream value for Callout and/or Track Overlays, you should use the HTTPS API request. This will fulfill the callout and track overlay requirement that all datastream values have the same timestamp.
The map widget settings has four tabs labeled ‘Map and GPS track’, ‘Callout’, ‘Track Overlays’, and ‘Misc’. Begin by selecting the ‘Map and GPS track’ tab and assigning / creating a location datastream.
Show location track - Turns on/off the display of the track. When enabled, you may choose a color and thickness for the track.
Disconnect track points period - when enabled, two sequential points with a delta higher than the specified threshold will not be connected.
Show direction - when enabled it will add a directional arrow to the track.
The Callout tab allows you to optionally configure additional datastream values to be displayed when a particular set of GPS coordinates are viewed. The datastream must have the advanced settings option ‘Save raw data’ enabled, and the same timestamp as the location datastream.
- Add Value – click this button to search and select for any Datastream you want to show in Callout window.
- Move – hover on the previosly added Datastream panel for action buttons to appear. Hold Move button and change the position of Callout Value, release mouse button, repeat with other panels once you find it fine.
- Delete – hover on the previosly added Datastream panel for action buttons to appear. Click Delete button (no confirmation is applied here)
The Track Overlays tab optionally configures additional datastreams to be visualized on the GPS track. Click the ‘+ Add Value’ button to add a datastream.
The datastream must have the advanced settings option ‘Save raw data’ enabled, and the same timestamp as the location datastream.
The Misc tab allows you to configure the track termination point style, and optionally the track course direction.
STYLE: POINT - choose the track termination style from the options of: Point, Course, Truck, and Device name.
Choose Datastream - select a datastream that contains course information in degrees (e.g. device compass data) in order to show the course direction with the Course and Truck track point styles.
Use global time range selector - when enabled, the global time range setting will constrain the range of data displayed.