on_section: Observe events on story map section transitions

View source: R/storymaps.R

on_sectionR Documentation

Observe events on story map section transitions

Description

For a given story_section(), you may want to trigger an event when the section becomes visible. This function wraps shiny::observeEvent() to allow you to modify the state of your map or invoke other Shiny actions on user scroll.

Usage

on_section(map_id, section_id, handler)

Arguments

map_id

The ID of your map output

section_id

The ID of the section to trigger on, defined in story_section()

handler

Expression to execute when section becomes visible.


mapgl documentation built on June 8, 2025, 1:57 p.m.