Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ControlGPS not working in RStudio #206

Open
bonushenricus opened this issue Jul 2, 2021 · 2 comments
Open

ControlGPS not working in RStudio #206

bonushenricus opened this issue Jul 2, 2021 · 2 comments
Labels

Comments

@bonushenricus
Copy link

bonushenricus commented Jul 2, 2021

Thanks a lot for the package.
I am trying with

map<-leaflet()%>% addControlGPS(options = gpsOptions(position = "topleft", activate = T, autoCenter = T, maxZoom = 10, setView = F))

activateGPS(map)

but in the resulting map, on the crosshair button it tells me

Geolocation error. User denied geolocation prompt

Thank you

@trafficonese
Copy link
Owner

It seems to work in Shiny but not in RStudio..

library(shiny)  
library(leaflet)
library(leaflet.extras)

ui <- fluidPage(leafletOutput("map"))

server <- function(input, output, session) {
  output$map <- renderLeaflet({
    leaflet() %>% 
      addTiles() %>% 
      addControlGPS(options = gpsOptions(position = "topleft", activate = T, autoCenter = T,  maxZoom = 10, setView = F)) %>% 
      activateGPS()
  })
}
shinyApp(ui, server)

@trafficonese trafficonese changed the title ControlGPS ControlGPS not working in RStudio Apr 4, 2024
@trafficonese
Copy link
Owner

@bonushenricus Do you wanna open a bug report at rstudio?
There is nothing I can do about that bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants