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 dinamically 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"
  }
}

The following list contains the available icons:

attention
location
car
residence
bus
motorcycle
truck
mail
tower
bridge
wifi
thermometer
male
flag
bullseye
barn
factory
circle

Parameter Configuration

Under the parameter configuration, you’ll find the timezone selector and a few specific options:

  • Connect markers with lines: this option makes every point of the same device to be connected through a line, as a route.
  • Ignore heading direction from variable: if checked, the heading property of your location data will be ignoring during the build of the map. So, instead of having an arrow pointing exactly to your heading direction in each point of your route, you’ll have automatically generated arrows placed all over your route.
  • 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. If you want to continue showing the latest valid location in this case, you will need to create an script to treat that.
  • 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: