The Dendra Station Widget is a small, interactive widget that displays the current and forecast conditions for a station. It is designed to be embedded in your website to provide a quick overview of the station’s data.
In the style attribute, modify the height as needed. The value 700px is the recommended default. If you go smaller, then more content will wrap inside the widget.
In the style attribute, modify the max-width as needed. The value 400px is the recommended default. If you go smaller, then more content will wrap inside the widget. If you want the widget to fill the available width of your page container, replace with 100%, e.g. max-width: 100%;
It is recommended to NOT modify the width in the style as it helps maintain a responsive width. Leave as-is, e.g. width: 100%;
Replace the text THE_WIDGET_URL with a URL as described below.
The default configuration provides an interactive widget that will adapt over time as we add more functionality. This is the easiest option. Here is the URL template:
A custom configuration is sometimes desired to lock-down the widget’s appearance and capabilities. When modifying the URL, it is HIGHLY recommended to leave all query parameters intact and simply modify their values as needed. Here is the URL template with our defaults:
Replace the text YOUR_ORG_ID with your organization’s unique id, e.g. organizationId=58db17c424dc720001671378
Replace the text YOUR_STATION_ID with your station’s unique id, e.g. stationId=58e68cabdf5ce600012602b3
If you want a widget that uses a dark mode styling to match your site’s appearance, then change dark=false to dark=true
If you do not want a border around the widget, then change outlined=true to outlined=false
Modify other parameters as needed (recommendation is to not remove parameters). The parameters are described below:
exploreData – Set to true to show the “Explore Data” button that links to Dendra’s data query page for the station. Otherwise, set to false to hide the button.
include – What data should be displayed in the widget. Set to current,forecast to show both current and forecast conditions. Set to current to only show current conditions. Set to forecast to only show forecast conditions.
lastSeen – Set to true to show the “Last seen” timestamp for datastreams. Otherwise, set to false to hide the timestamp.
photoBackground – Set to true to show a photo of the station in the header, allowing the user to reveal the photo by clicking a button. Otherwise, set to false to hide the photo.
photoDrawer – When a station photo is displayed, set to true to allow the user to reveal the photo by clicking a button. Otherwise, set to false to hide the button. This parameter could be used to simply disable the photo drawer while allowing the station photo to be displayed in the background only.
somId – System of measurement. Set to met to use Metric units for all data. Set to imp to use English units for all data.
timeGeo – Set to true to show the station’s current time and geo coordinates. Otherwise, set to false to hide this information and render a smaller widget header.
Full URL example, current conditions only (click here to preview it):