cmkimber / Elections_Ontario_App

Webapp to explore Elections Ontario data
0 stars 0 forks source link

Make map popup respond to select input #1

Closed cmkimber closed 3 months ago

cmkimber commented 3 months ago

At present, the map popup is triggered in the renderLeaflet() call but is not linked to the reactive value district_input_filter(). As a result, it appears when the map is clicked to select a district but not when a district is selected with the selectInput(). The popup needs to be responsive to observeEvent() calls involving district_input_filter().

cmkimber commented 3 months ago

This is now resolved. Map popups are now handled with a call to addPopups() inside the observeEvent() call which tracks changes in both map-click and dropdown inputs via district_input_filter(), so the popup updates with any change in either input. The formatting of popup text is now handled by a global function that is executed with a change in input.