Hello, I ve the message "An error has occured" when I try to launch the leaflet page that I ve created.
The message is : Error 137, "The application failed to start"
The time seems too be long before to get the message. More than 15 secondes
(I ve too a warning about 'reticulate' which is "remplaced" by .GlobalEnv.)
I use a Slq request to get the data from my PostgreSql database.
df_postgresUsersLeafLet <- dbGetQuery(con, "SELECT distinct instance_id,first_name,last_name,gender,postcode,latitude,longitude,moving_date,city,'D' as Demenagement from core.users inner join core.address on core.users.destination_address_id=core.address.id
where core.address.latitude>41 and core.address.latitude<51 and core.address.longitude>-5.5667 and core.address.longitude<8.5316" )
Regroupement<-df_postgresUsersLeafLet%>% count(instance_id,latitude,longitude,city)
ui <- fluidPage(
p(),
leafletOutput("mymap")
)
server <- function(input, output, session) {
ERA <- Regroupement %>%filter(instance_id=="eraimmobilier")
SERGIC <- Regroupement %>%filter(instance_id=="sergic")
output$mymap <- renderLeaflet({
leaflet(Regroupement) %>%
addTiles() %>%
addCircles(data=ERA,
lat=~latitude,
lng=~longitude,
radius=~n,
group = "eraimmobilier",
color = "#a500a5", fillOpacity = 0.1)%>% addCircles(data=SERGIC,
lat=~latitude,
lng=~longitude,
radius=~n,
group = "sergic",
color = "#a500a5", fillOpacity = 0.1)%>%addLayersControl(
overlayGroups = c("eraimmobilier", "sergic"),
options = layersControlOptions(collapsed = FALSE))
})
}
shinyApp(ui, server)
Do you have an idea about what is bad with that. ?
Thanks.