Introducing Templatable GPS and Data Table Dashboard Blocks

Brandon Cannaday
Brandon Cannaday | 1 minute read

Today's release brings powerful new functionality to the GPS History and Data Table dashboard blocks. You can now override the default style and display information in a way that makes the most sense for your connected experience.

GPS History Templates

You can now provide templates to override the icon and popup for any data point on the GPS history block.

View my Losant-powered widget "ISS Location"

In the above example, which shows the location of the Internation Space Station, I used the templating to replace the icon with a picture of a satellite and changed the contents of the popup to add a link to the ISS live stream. Below is a screenshot of the block's configuration.

gps-config.png

As you can see, the icon supports Handlebars and can resolve to any image URL. I used the "isLastPoint" variable because I only want an icon on the current location of the ISS.

The popup template has full Markdown support, and just like the icon, I use the "isLastPoint" variable because I only want a popup on the current location.

You can see a list of available variables and more examples on the GPS History Block documentation.

Data Table Templating

You can now change what's displayed for every cell in a Data Table Block.

datatable.png

In the above example, which shows recent temperatures in Cincinnati, I've removed the device name column and added an icon next to the temperature based on how high it is. If the temperature is over 90 it displays a red icon. If it's above 80 it will display a yellow icon. The configuration for this table is below.

datatable-config.png

Each cell template supports full Markdown so you can display pretty much anything you want based on the value. You can also change the column header if needed. Check out the full data table documentation for details.

What's Next?

With every new release, we really listen to your feedback. By combining your suggestions with our roadmap, we can continue to make the platform easy for you. Let us know what you think in the Losant Forums.