title: Click event on Leaflet tile map in Shiny
body: <p>Is it possible to get the lat long from a click event in leaflet/shiny (in R) from the tile map? (i.e. NOT from any loaded markers, polygons etc). Just to show positional (lat/long) info i guess.</p>
  
  <p>I thought maybe from <a href="https://stackoverflow.com/questions/28938642/marker-mouse-click-event-in-r-leaflet-for-shiny">this qu</a> it was possible but no luck. </p>
  
  <pre><code>ui &lt;- bootstrapPage(
    tags$style(type = "text/css", "html, body {width:100%;height:100%}"),
    leafletOutput("map", width = "100%", height = "100%")
  )
  
  server &lt;- function(input, output,session) {
  
    output$map &lt;- renderLeaflet({
      leaflet() %&gt;% 
        addProviderTiles("CartoDB.Positron")%&gt;%
        setView(lng = -4, lat= 52.54, zoom = 7)
    })
  
    #Show popup on click
    observeEvent(input$map_marker_click, {
      click &lt;- input$map_marker_click
      text&lt;-paste("Lattitude ", click$lat, "Longtitude ", click$lng)
  
      proxy &lt;- leafletProxy("map")
      proxy %&gt;% clearPopups() %&gt;%
        addPopups(click$lng, click$lat, text)
    })
  
  }
  
  runApp(shinyApp(ui, server), launch.browser = TRUE)
  </code></pre>
  
  <p>Ultimately i want to create a click marker for raster data (using the returned lat/long) in Leaflet &amp; Shiny but this would be a good start (T<a href="https://stackoverflow.com/questions/37523323/identify-position-of-a-click-on-a-raster-in-leaflet-in-r">his qu seems to have done something</a> but i cannot recreate it at all). </p>