Skip to Content
EmbedsConditions widget

Conditions widget

<ullr-widget> is the complete conditions experience in one element: an interactive map of the mountain beside a details panel your visitors can browse. The panel has tabs for terrain park features, trails and lifts, plus the updates your crew posts through the day.

Use it when you want a single “conditions” page and do not want to assemble one out of the smaller embeds. If you only need a map, or only a status table, the interactive map, trail list and lift list are lighter.

Screenshot pending — The Ullr conditions widget
public/img/embeds/conditions-widget.png
The conditions widget: map on one side, browsable features, trails, lifts and reports on the other.

Install

<script type="module" src="https://widget.ullr.ski/web-components/ullr-widget.js"></script> <ullr-widget apiKey="1a2b3c4d5e6f.yourPublishableKey" areaId="your-area-id" sport="SNOW" showFeatures="true" showTrails="true" showLifts="true" initialMapStyle="VECTOR" units="imperial" theme="#6B8CF9" style="display:block;position:relative;height:600px" ></ullr-widget>

The widget fills its container, so it needs an explicit height — without one it collapses to nothing and the page looks empty. The style attribute above is what the dashboard generates; a CSS rule works just as well.

Required scopes

Your publishable key needs resorts:read and updates:read, plus one scope per layer you switch on: features:read, trails:read, lifts:read. If you hide the Updates tab with hideParkLogs="true", you can drop updates:read.

Attributes

Widget options

hideParkLogsbooleanOptional
Hide the Updates tab (park reports). The dashboard shows this as the inverse — "Show park reports" — so a ticked box there means this attribute is absent.
Default: false
defaultEntityFEATURES | TRAILS | LIFTSOptional
Which panel opens first.
Default: FEATURES (TRAILS when sport is BIKE)
showFeaturesbooleanOptional
Show terrain park features on the map.
Default: true
showTrailsbooleanOptional
Show trail lines on the map.
Default: false
showLiftsbooleanOptional
Show lifts on the map.
Default: false
initialMapStyleVECTOR | SATELLITEOptional
Base map style. VECTOR is the topographic style.
Default: the area's configured default
unitsimperial | metricOptional
Units for distances and lengths.
Default: imperial
enableCooperativeGesturesbooleanOptional
Require Ctrl (or ⌘) while scrolling to zoom the map. Turn this on when the embed sits in a scrolling page, so a scroll gesture over the map scrolls the page instead of zooming.
Default: false
mapDefaultLatitudenumberOptional
Starting latitude. Ignored unless between −90 and 90.
Default: the area's configured default
mapDefaultLongitudenumberOptional
Starting longitude. Ignored unless between −180 and 180.
Default: the area's configured default
mapDefaultBearingnumberOptional
Starting bearing in degrees. Ignored unless between 0 and 360.
Default: the area's configured default
mapDefaultPitchnumberOptional
Starting map pitch in degrees.
Default: 45
enableMultiSelectbooleanOptional
Allow selecting more than one object on the map at a time.
Default: false
enableEventsFeatureSelectionbooleanOptional
Emit and listen for cross-element ullr-feature-select events, so two Ullr embeds on the same page stay in sync when a feature is selected.
Default: false
enableEventsTrailSelectionbooleanOptional
Emit and listen for cross-element ullr-trail-select events, so two Ullr embeds on the same page stay in sync when a trail is selected.
Default: false
enableEventsLiftSelectionbooleanOptional
Emit and listen for cross-element ullr-lift-select events, so two Ullr embeds on the same page stay in sync when a lift is selected.
Default: false

Common attributes

Shared by all four embeds.

apiKeystringRequired
Your publishable API key, in the form {id}.{secret}. Sent as the api-key header on every request the element makes. Without it the element logs an error and renders nothing.
areaIdstringRequired
The area (resort) to display. Without it the element logs an error and renders nothing.
sportSNOW | BIKEOptional
Which sport’s data to show. Also selects the default colour palette — blue for snow, green for bike.
Default: SNOW
themestringOptional
Primary colour as a hex value, e.g. #6B8CF9. Three- or six-digit hex only; anything else is ignored and the sport default is used. The secondary colour is derived automatically.
Default: #6B8CF9 (snow) / #50A162 (bike)
timestampnumberOptional
Show the hill as it was at this moment, in milliseconds since the Unix epoch, instead of live. Ignored unless your key holds the matching history scope.
ullrKeystringOptional
Legacy alias for apiKey, kept so older snippets keep working. Only read when apiKey is absent. Use apiKey in new code.

Notes

  • Layer defaults differ from the dashboard. The element defaults to features on, trails and lifts off. The dashboard configurator defaults all three on and always writes them into the snippet — so a hand-written tag that omits them will show less than the one the dashboard generates.
  • theme works here and on the other three embeds, but the dashboard only offers a colour picker for this one. Set it by hand elsewhere if you want it.
  • The Updates tab reads park reports through the Public API, so a key without updates:read shows an empty tab rather than an error. Hide it with hideParkLogs="true" if you are not using it.
  • Combine with other embeds on the same page by turning on the matching enableEvents*Selection attributes — selecting a trail in one element then selects it in the other.