Interactive map
<ullr-map> is the map on its own: pan, zoom and tilt around your mountain with
live trail, lift and terrain park status drawn on top. Visitors can tap an
object to see its detail.
Use it when you already have a conditions page and want a map on it, or when you want the map somewhere the full conditions widget would be too much — a homepage hero, say.
public/img/embeds/interactive-map.pngInstall
<script type="module" src="https://widget.ullr.ski/web-components/ullr-map.js"></script>
<ullr-map
apiKey="1a2b3c4d5e6f.yourPublishableKey"
areaId="your-area-id"
sport="SNOW"
showTrails="true"
showLifts="true"
showFeatures="true"
initialMapStyle="VECTOR"
units="imperial"
enableCooperativeGestures="true"
style="display:block;position:relative;height:600px"
></ullr-map>The map fills its container and needs an explicit height, or it collapses to nothing.
Set enableCooperativeGestures="true" whenever the map sits inside a page
visitors scroll. Without it, a scroll gesture over the map zooms the map and
traps the reader; with it, they must hold Ctrl (or ⌘) to zoom and an ordinary
scroll moves the page.
Required scopes
resorts:read, plus one per layer you turn on: trails:read, lifts:read,
features:read.
Attributes
Map options
showFeaturesbooleanOptionaltrueshowTrailsbooleanOptionalfalseshowLiftsbooleanOptionalfalseinitialMapStyleVECTOR | SATELLITEOptionalVECTOR is the topographic style.the area's configured defaultunitsimperial | metricOptionalimperialenableCooperativeGesturesbooleanOptionalfalsemapDefaultLatitudenumberOptionalthe area's configured defaultmapDefaultLongitudenumberOptionalthe area's configured defaultmapDefaultBearingnumberOptionalthe area's configured defaultmapDefaultPitchnumberOptional45enableMultiSelectbooleanOptionalfalseenableEventsFeatureSelectionbooleanOptionalullr-feature-select events, so two Ullr embeds on the same page stay in sync when a feature is selected.falseenableEventsTrailSelectionbooleanOptionalullr-trail-select events, so two Ullr embeds on the same page stay in sync when a trail is selected.falseenableEventsLiftSelectionbooleanOptionalullr-lift-select events, so two Ullr embeds on the same page stay in sync when a lift is selected.falseCommon attributes
Shared by all four embeds.
apiKeystringRequired{id}.{secret}. Sent as the api-key header on every request the element makes. Without it the element logs an error and renders nothing.areaIdstringRequiredsportSNOW | BIKEOptionalSNOWthemestringOptional#6B8CF9. Three- or six-digit hex only; anything else is ignored and the sport default is used. The secondary colour is derived automatically.#6B8CF9 (snow) / #50A162 (bike)timestampnumberOptionalullrKeystringOptionalapiKey, 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 shows features only; the dashboard turns on all three and writes them into the snippet.
mapDefaultLatitude,mapDefaultLongitudeandmapDefaultBearingfall back to the area’s configured defaults when out of range or absent — so it is safe to omit them and let the resort’s own framing apply.- Pair the map with a trail list or
lift list and turn on the matching
enableEvents*Selectionattributes on both to keep them in sync.