Hi guys,
I have some images in www folder that they have to show up by clicking on a part of a map. They work perfectly on my local machine, but they do not show up when the app is published on shinyapps.io. I have tried changing directory address, but did not help! Any idea what the problem could be and how to fix it?
Here is the part of the code on the server file:
output$floorPlan <- renderImage({
validate(need(sum(BldngsSum$name == bldngClcd()) > 0, ""))
planType <- BldngsSumCalc()$Btype[BldngsSumCalc()$name == bldngClcd()]
if (planType == "F1") {
return(list(src = "www/F1bldng.png", filetype = "image/png", alt = "F1"))
} else if (planType == "F2") {
return(list(src = "www/F2bldng.png", filetype = "image/png", alt = "F2"))
} else if (planType == "F3") {
return(list(src = "www/F3bldng.png", filetype = "image/png", alt = "F3"))
} else if (planType == "F4") {
return(list(src = "www/F4bldng.png", filetype = "image/png", alt = "F4"))
}
}, deleteFile = FALSE)
Here is the link to my app: Seaside, Oregon, USA
It takes a while to be completely loaded. After the map shows up, you should click on any of the orange buildings. An image is supposed to show up on the right side after the tables on "Building Info." section. But, a broken image icon shows up!