{"action":"created","issue":{"url":"https://api.github.com/repos/r-spatial/mapview/issues/145","repository_url":"https://api.github.com/repos/r-spatial/mapview","labels_url":"https://api.github.com/repos/r-spatial/mapview/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/r-spatial/mapview/issues/145/comments","events_url":"https://api.github.com/repos/r-spatial/mapview/issues/145/events","html_url":"https://github.com/r-spatial/mapview/issues/145","id":311046371,"node_id":"MDU6SXNzdWUzMTEwNDYzNzE=","number":145,"title":"removeMouseCoordinates option","user":{"login":"fawda123","id":3086881,"node_id":"MDQ6VXNlcjMwODY4ODE=","avatar_url":"https://avatars3.githubusercontent.com/u/3086881?v=4","gravatar_id":"","url":"https://api.github.com/users/fawda123","html_url":"https://github.com/fawda123","followers_url":"https://api.github.com/users/fawda123/followers","following_url":"https://api.github.com/users/fawda123/following{/other_user}","gists_url":"https://api.github.com/users/fawda123/gists{/gist_id}","starred_url":"https://api.github.com/users/fawda123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fawda123/subscriptions","organizations_url":"https://api.github.com/users/fawda123/orgs","repos_url":"https://api.github.com/users/fawda123/repos","events_url":"https://api.github.com/users/fawda123/events{/privacy}","received_events_url":"https://api.github.com/users/fawda123/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-04-04T00:43:08Z","updated_at":"2018-08-16T18:48:15Z","closed_at":"2018-08-16T09:10:24Z","author_association":"NONE","body":"Hi, it would be great if there was an option to remove the mouse coordinates dialog at the top of the map.  I've found a solution [here](https://stackoverflow.com/questions/48880760/hide-mouse-cursor-and-projection-information-in-mapview-in-r) but it doesn't seem to work with multiple maps in a Shiny app. \r\n\r\nThis is an app that uses mapview with Shiny, works as intended:\r\n```{r}\r\nlibrary(shiny)\r\nlibrary(leaflet)\r\nlibrary(mapview)\r\n\r\npts <- data.frame(\r\n  x = rnorm(10, mean = -93.625), \r\n  y = rnorm(10, mean = 42.0285)\r\n)\r\n\r\nmapin <- mapview(pts, xcol= 'x', ycol = 'y')@map \r\n\r\n# Define UI \r\nui <- fluidPage(\r\n  \r\n  sliderInput(\"radius\",\r\n              \"Point radius:\",\r\n              min = 1,\r\n              max = 50,\r\n              value = 30),\r\n  \r\n  leafletOutput('map1'),\r\n             \r\n  leafletOutput('map2')   \r\n            \r\n  )\r\n)\r\n\r\n# Define server logic\r\nserver <- function(input, output) {\r\n  \r\n  output$map1 <- renderLeaflet({\r\n    mapin %>% \r\n      addTiles() %>% \r\n      setView(-93.65, 42.0285, zoom = 6)\r\n  })\r\n  output$map2 <- renderLeaflet({\r\n    mapin %>% \r\n      addTiles() %>% \r\n      setView(-93.65, 42.0285, zoom = 6)\r\n  })\r\n  \r\n  observe({\r\n    \r\n    tab1 <- leafletProxy('map1', data = pts) %>%\r\n      clearMarkers() %>% \r\n      addCircleMarkers(lng = ~x, lat = ~y, radius = input$radius)\r\n    \r\n    tab2 <- leafletProxy('map2', data = pts) %>% \r\n      clearMarkers() %>% \r\n      addCircleMarkers(lng = ~x, lat = ~y, radius = input$radius)\r\n    \r\n  })\r\n  \r\n}\r\n\r\n# Run the application \r\nshinyApp(ui = ui, server = server)\r\n```\r\nThis is the same app but using a function from the above link that attempts to remove the mouse coordinates.  It kind of works but only one plot is rendered. Could this be solved with a hard-wired option in mapview to remove the mouse coordinates? \r\n```{r}\r\nlibrary(shiny)\r\nlibrary(leaflet)\r\nlibrary(mapview)\r\n\r\npts <- data.frame(\r\n  x = rnorm(10, mean = -93.625), \r\n  y = rnorm(10, mean = 42.0285)\r\n)\r\n\r\nremoveMouseCoordinates = function(map) {\r\n\r\n  rc = map$jsHooks$render\r\n  rc_lnlt = lapply(rc, grep, pattern = \"lnlt\")\r\n  for (i in seq_along(map$jsHooks$render)) {\r\n    map$jsHooks$render[[i]][rc_lnlt[[i]]] = NULL\r\n  }\r\n  \r\n  return(map)\r\n  \r\n}\r\n\r\nmapin <- mapview(pts, xcol= 'x', ycol = 'y')@map %>% \r\n  removeMouseCoordinates\r\n\r\n# Define UI \r\nui <- fluidPage(\r\n  \r\n  sliderInput(\"radius\",\r\n              \"Point radius:\",\r\n              min = 1,\r\n              max = 50,\r\n              value = 30),\r\n  \r\n  leafletOutput('map1'),\r\n             \r\n  leafletOutput('map2')   \r\n            \r\n  )\r\n)\r\n\r\n# Define server logic\r\nserver <- function(input, output) {\r\n  \r\n  output$map1 <- renderLeaflet({\r\n    mapin %>% \r\n      addTiles() %>% \r\n      setView(-93.65, 42.0285, zoom = 6)\r\n  })\r\n  output$map2 <- renderLeaflet({\r\n    mapin %>% \r\n      addTiles() %>% \r\n      setView(-93.65, 42.0285, zoom = 6)\r\n  })\r\n  \r\n  observe({\r\n    \r\n    tab1 <- leafletProxy('map1', data = pts) %>%\r\n      clearMarkers() %>% \r\n      addCircleMarkers(lng = ~x, lat = ~y, radius = input$radius)\r\n    \r\n    tab2 <- leafletProxy('map2', data = pts) %>% \r\n      clearMarkers() %>% \r\n      addCircleMarkers(lng = ~x, lat = ~y, radius = input$radius)\r\n    \r\n  })\r\n  \r\n}\r\n\r\n# Run the application \r\nshinyApp(ui = ui, server = server)\r\n```\r\n  "},"comment":{"url":"https://api.github.com/repos/r-spatial/mapview/issues/comments/413647329","html_url":"https://github.com/r-spatial/mapview/issues/145#issuecomment-413647329","issue_url":"https://api.github.com/repos/r-spatial/mapview/issues/145","id":413647329,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzY0NzMyOQ==","user":{"login":"fawda123","id":3086881,"node_id":"MDQ6VXNlcjMwODY4ODE=","avatar_url":"https://avatars3.githubusercontent.com/u/3086881?v=4","gravatar_id":"","url":"https://api.github.com/users/fawda123","html_url":"https://github.com/fawda123","followers_url":"https://api.github.com/users/fawda123/followers","following_url":"https://api.github.com/users/fawda123/following{/other_user}","gists_url":"https://api.github.com/users/fawda123/gists{/gist_id}","starred_url":"https://api.github.com/users/fawda123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fawda123/subscriptions","organizations_url":"https://api.github.com/users/fawda123/orgs","repos_url":"https://api.github.com/users/fawda123/repos","events_url":"https://api.github.com/users/fawda123/events{/privacy}","received_events_url":"https://api.github.com/users/fawda123/received_events","type":"User","site_admin":false},"created_at":"2018-08-16T18:48:15Z","updated_at":"2018-08-16T18:48:15Z","author_association":"NONE","body":"Works, thanks!"}}
{"actor":{"display_login":"fawda123"}}