If your selected variable has information of location about a device, you can visualize it in a map. 

As you pick variables for your map, you’ll have a couple more options to fill about its device of origin:

  • Icon: choose an icon and color to represent the device on the map.
  • Label: give that device an alias to be shown inside the information window. This is useful to differentiate devices with the same icon and color on the map.
  • Color: choose a color for the device to be displayed on the map.
https://cdn.elev.io/file/uploads/PEfBOej3wR4slKcXFF0VfOndFuEYx_C9vFdA35csXyc/ke8t7CiXNoapV9o1otnZMoPiHaeovVnZjjn7HJmafBM/widget_map_variables-dew.png

If you don’t know how to send location coordinates within your data, please read our API docs.


Color Options

You are able to dynamically define colors for the icons on the map. By default, the color of the icon is defined inside Widget configuration tab. However, if you use metadata when sending a variable from your device to TagoIO, you are able to redefine the icon color of that specific variable.

{
  "variable": "location",
  "value": "My Address",
  "location": {
    "lat": 42.2974279,
    "lng": -85.628292
  },
  "metadata": {
    "color": "green"
  }
}

Icon options

Users can dynamically define the icon to be displayed in the map. By default, the icon is defined inside Widget configuration screen. However, if you use metadata when sending a variable from your device to TagoIO, you are able to redefine the icon of that specific variable.

{
  "variable": "location",
  "value": "My Address",
  "location": {
    "lat": 42.2974279,
    "lng": -85.628292
  },
  "metadata": {
    "color": "green",
    "icon": "car"
  }
}

You can pick the icon from the list or add your own customized icon by adding the link (https only) of the image in .svg format.

Use can use Files to store your image.


Parameter Configuration

Some additional options to customize your map:

  • Connect markers with lines: it connects each point with a line, as a route. Select animation to indicate the direction of the path (ant effect)
  • Do not open info windows automatically: if checked, the window with the data values won’t automatically open when the widget is shown or when new points are plotted in real time.
  • Show icons for all values: this option will make the device icon appear for every point of his route in the map.
  • Do not display (0, 0) coordinates: sometimes GPS devices send locations with latitude 0 and longitude 0 when they are not able to obtain a precise location, which can affect the routes on your map. Check this option if you are having this kind of problem. Have in mind that if you use ‘Only Last Location’ together with this option, and the GPS sends a location (0,0) no icon will be showed in the map.
  • Maximum number of points to be displayed: this option will help you to filter exactly the amount of data you need, while it still keeps the mostly recent.
  • Group the samples by: sometimes only one of your variables has the location information, but there are other variables related to it that you would like to display together on the map, in this case you must make use of a serie. Otherwise it will be grouped using the time and location of each data.
  • Initial zoom: This option sets the initial zoom of the map.
  • Show only data related to last location of variable: If this option is set to yes, only the last location of each variable will be showed as a pin in the map. When the map is updated in realtime and this options is set to yes, the position of the map will always follow the location of the variable that arrived.

Also check out: