googleVis icon indicating copy to clipboard operation
googleVis copied to clipboard

gvisMap failing to load map in shinyapp on AWS

Open ghost opened this issue 8 years ago • 4 comments

Hi, I have a shiny app which is using googleVis package in R. I am using gvisMap to plot some latlong. The app runs fine on my local machine without any issues but he same app loads the MAP for some seconds and than dis-appears citing a java script error: Google Maps API error: MissingKeyMapError.

I have gone through the googleVis documentation and there is no way to provide an API key. Can someone help me. Here is the code in R that is generating the the map output.

output$chart1 <- renderGvis({ if(input$state=="All"){ gvisMap(cplex_user_state, "latlong" , "num_users", options=list(showTip=TRUE, showLine=TRUE, enableScrollWheel=TRUE, mapType='terrain', useMapTypeControl=TRUE,width=600,height=400)) } else { gvisMap(filter(cplex_user_state,state==input$state), "latlong" , "num_users", options=list(showTip=TRUE, showLine=TRUE, enableScrollWheel=TRUE, mapType='terrain', useMapTypeControl=TRUE,width=600,height=400)) } })

ghost avatar Feb 03 '17 12:02 ghost

Can you please provide a self-contained minimal reproducible example.

On 3 February 2017 at 12:16, deep2843 [email protected] wrote:

Hi, I have a shiny app which is using googleVis package in R. I am using gvisMap to plot some latlong. The app runs fine on my local machine without any issues but he same app loads the MAP for some seconds and than dis-appears citing a java script error: Google Maps API error: MissingKeyMapError.

I have gone through the googleVis documentation and there is no way to provide an API key. Can someone help me. Here is the code in R that is generating the the map output.

output$chart1 <- renderGvis({ if(input$state=="All"){ gvisMap(cplex_user_state, "latlong" , "num_users", options=list(showTip=TRUE, showLine=TRUE, enableScrollWheel=TRUE, mapType='terrain', useMapTypeControl=TRUE,width=600,height=400)) } else { gvisMap(filter(cplex_user_state,state==input$state), "latlong" , "num_users", options=list(showTip=TRUE, showLine=TRUE, enableScrollWheel=TRUE, mapType='terrain', useMapTypeControl=TRUE,width=600,height=400)) } })

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mages/googleVis/issues/54, or mute the thread https://github.com/notifications/unsubscribe-auth/ABF-1c0-3fNkP8j78LEj8jhG8JUBF3Seks5rYxqfgaJpZM4L2Qyt .

mages avatar Feb 03 '17 12:02 mages

I am having the same issue. Here is an example M1 <- gvisMap(Andrew, "LatLong" , "Tip", options=list(showTip=TRUE, showLine=TRUE, enableScrollWheel=TRUE, mapType='hybrid', useMapTypeControl=TRUE, width=800,height=400))

plot(M1)

jps-mads avatar Feb 24 '17 19:02 jps-mads

The above is using data(Andrew) from library(googleVis)

jps-mads avatar Feb 24 '17 19:02 jps-mads

The above works fine for me. Can you please provide a self-contained minimal reproducible Shiny example.

mages avatar Feb 25 '17 10:02 mages