Hi,
I'm trying to serve raster tiles locally from my computer using two approaches shared online but I'm unable to get the tiles to display in the Shiny app.
The tiles were generated using gdal2tiles.py (see link below for output files):
$ gdal2tiles.py -s EPSG:4326 -a 0,0,0 -z 1-10 -w none VNM_msk_alt.vrt
Approach No. 1 to serve tiles:
Using this reference: see following post (seems I don't have permission to post URLs here)
My code:
server <- function(input, output, session) {
addResourcePath("mytiles", "/home/user/Desktop/srtm2/VNM_msk_alt")
addTiles(urlTemplate = "/mytiles/{z}_{x}_{y}.png",
group = "DEM (SRTM) Vietnam") %>%
Approach No. 2 to serve tiles:
Using this reference: see following post (seems I don't have permission to post URLs here)
My code:
setwd("/home/user/RDATA/projects/ta")
server <- function(input, output, session) {
deamon_id <- servr::httd(port = 8003, daemon = TRUE)addTiles(urlTemplate = "http://localhost:8003/VNM_msk_alt/{z}_{x}_{y}.png", group = "DEM (SRTM) Vietnam") %>%
I've also tried by setting up a local http server with: $ python2 -m SimpleHTTPServer 8003
I've zoomed in and out at different levels in the Shiny viewer.
Thanks for suggestions on how to get this to work.
[ tiles link: see following post (seems I don't have permission to post URLs in this message)]