1

Is there a way to get to current zoom level of a googleway::google_map ?

I'm trying to get the current zoom level of a shiny map in the same way I access to the coordinate of a marker

(quite same question than How to find current zoom level in a Google Map? but with the googleway package)

thanks !

library(shiny)
library(googleway)

shinyApp(

ui = fluidPage(google_mapOutput("map")),

server = function(input, output, session){
  
  api_key <- "YourAPI_Key"
     
output$map <- renderGoogle_map({    
    map<-google_map(key = api_key, location = c(48.80940, 2.326488), zoom = 19)%>%
      add_drawing(drawing_modes=c("marker", "polygon"), delete_on_change = F)
    map
  })

observeEvent(input$map_markercomplete, {
    print("Marker Complete")
    print(input$map_markercomplete)})
  
})

shinyApp(ui, server)
Ben
  • 21
  • 1

0 Answers0