title: Struggling to link reactive data values from plotly_hover to leaflet map without reloading leaflet
body: <p>I want to use the plotly_hover values from a time series plot and show the GPS position on a leaflet map at the same time stamp as the plotly_hover. </p>
  
  <p>I found a way, but the leaflet map reloads each time the hover changes position. I am now trying the following code. This is where I am stuck with event.data and observe to link the time series plot and the leaflet map for displaying the position (lat &amp; lon) on the map and the speed value in the time series plot at the same time when hovering on the plot. </p>
  
  <p>I reduce the data frame just for practical purpose, but the error is the same. Warning: Error in UseMethod: no applicable method for 'metaData' applied to an object of class "character"</p>
  
  <pre><code>DateTime &lt;- c("2019-06-18 02:45:00", "2019-06-18 02:30:00", 
            "2019-06-18 02:15:00", "2019-06-18 02:00:00", 
            "2019-06-18 01:45:00", "2019-06-18 01:30:00", 
            "2019-06-18 02:45:00", "2019-06-18 02:30:00",
            "2019-06-18 02:15:00", "2019-06-18 02:00:00",
            "2019-06-18 01:45:00", "2019-06-18 01:30:00")
  
  ShipName &lt;- c("ShipA", "ShipA", "ShipA", "ShipA", "ShipA", "ShipA", 
                "ShipB", "ShipB", "ShipB", "ShipB", "ShipB", "ShipB")
  
  Latitude &lt;- c(24.97308, 25.01779, 25.06509, 25.11231, 25.16046, 25.21110, 
                23.63477, 23.66860, 23.70218, 23.73552, 23.76868, 23.80180)
  
  Longitude &lt;- c(36.02598, 35.98830, 35.95460, 35.92248, 35.89232, 
                 35.86438, 59.11677, 59.07402, 59.03015, 58.98605, 
                 58.94183, 58.89752)
  
  GPSSpeed &lt;- c(13.6, 13.4, 13.4, 13.4, 13.4, 13.5, 12.5, 12.6, 12.5, 12.5, 
                12.7, 12.7)
  
  DF &lt;- data.frame(DateTime, ShipName, Latitude, Longitude, GPSSpeed)
  DF$DateTime &lt;- as.POSIXct(DF$DateTime)
  
  
  ui &lt;- bootstrapPage(
  
    fluidRow(
      column(4,selectInput(inputId = "shipname",
                     label = "ShipName",
                     choices = c("ShipA", "ShipB"),
                     selected = NULL,
                     multiple = FALSE)),
     column(4,dateRangeInput(inputId = "daterange",
                        label = "Date Range:",
                        format = "yyyy-mm-dd",
                        start = as.Date("2019-06-17"),
                        end = as.Date("2019-06-19"))),
     column(4,selectInput(inputId = 'Feature1',
                     label = 'T1 Option 1 for left y-axis:',
                     choices = c("Blank",c(colnames(bw[,-c(1:2)]))),
                     selected="GPSSpeed"))),
  
  
      plotlyOutput(outputId = 'timeseries1', height = 300),
  
  
      leafletOutput(outputId = "mymap", height = 300)
  
   )
  
  
  
  
  server &lt;- function(input, output){
  
   # Create an empty column to have the plot empty
   DF$Blank &lt;- NA
  
   # Plot time series chart 1 
   output$timeseries1 &lt;- renderPlotly({
  
      Filtered_DF &lt;- DF %&gt;% filter(ShipName == input$shipname) %&gt;% 
      filter(DateTime &gt;= input$daterange[1]  &amp; DateTime &lt;= 
      input$daterange[2])
  
  
       p &lt;- plot_ly(Filtered_DF, x = ~DateTime, key = ~DateTime, source = 
                    "latPos") %&gt;%
       #add_lines(y = ~get(input$Feature1), 
       #          name = paste(as.character(input$Feature1))) %&gt;%
       add_trace(y = ~get(input$Feature1), 
                 name = paste(as.character(input$Feature1)), 
                 type = 'scatter', 
                 mode = 'lines')  %&gt;%
       layout(legend = list(nrow = 2,
                            orientation = "h",
                            x = 0, y = -0.25),
                            hovermode = 'x',
                            xaxis = list(title = "DateTime"),
                            autosize = TRUE) %&gt;%
       config(displayModeBar = TRUE)
       p
     })
  
  
  filteredData &lt;- reactive({
  
  DF %&gt;% filter(ShipName == input$shipname) %&gt;% 
   filter(DateTime &gt;= input$daterange[1] &amp; DateTime &lt;= input$daterange[2])
  
   event.data &lt;- event_data(event = "plotly_hover", source = "latPos")
    if (is.null(event.data)) {
      print("Hover to see the lat posistion of the point filterdata")
    } else { 
      Filtered_DF %&gt;% filter(DateTime == event.data$key)
    }
  })
  
  
   output$mymap &lt;- renderLeaflet({
  
    Filtered_DF &lt;- DF %&gt;% 
    filter(ShipName == input$shipname) %&gt;% 
    filter(DateTime &gt;= input$daterange[1] &amp; DateTime &lt;= input$daterange[2])
  
    leaflet(Filtered_DF) %&gt;%
      setView(lng = 0, lat = 0, zoom = 2)  %&gt;% 
      addTiles() %&gt;%
      addPolylines(lat = ~Latitude, lng = ~Longitude, color = "blue", 
                   weight = 1)
   })
  
  
   observe({
    leafletProxy("mymap", data = filteredData()) %&gt;%
    addCircles(lat = ~Latitude, lng = ~Longitude, weight = 3)
    })
  
  }
  
  shinyApp(ui=ui, server=server)
  </code></pre>