Is there a way to identify the input handlers for a specific package? There are unique input handlers for leaflet, such as input$mymap_shape_mouseover that are not documented in R. My goal is to extract coordinates from a flat png heatmap used in leaflet and convert them into the matrix I have previously plotted.
library(shiny)
library(leaflet)
library(leaflet.extras)
library(mapview)
library(foreach)
server <- function(input, output, session) {
points <- eventReactive(input$recalc, {
cbind(rnorm(40) * 2 + 13, rnorm(40) + 48)
}, ignoreNULL = FALSE)
output$mymap <- renderLeaflet({
bounds <- c(0, 0, 14400, 14400)
leaflet(options = leafletOptions(
crs = leafletCRS(crsClass = "L.CRS.Simple"),
minZoom = -5,
maxZoom = 5)) %>%
fitBounds(bounds[1], bounds[2], bounds[3], bounds[4]) %>%
htmlwidgets::onRender("
function(el, t) {
var myMap = this;
var bounds = myMap.getBounds();
var image = new L.ImageOverlay(
'https://github.com/theaidenlab/juicebox/wiki/images/domains_peaks.png',
bounds);
image.addTo(myMap);
}") %>%
addMeasure() %>%
addMiniMap( toggleDisplay = TRUE,
position = "bottomleft") %>% addDrawToolbar() %>% addFullscreenControl() %>%
addMouseCoordinates(style="basic")
})