This works currently only in a shinyApp opened in the browser, since a "scene.yaml" file is passed to the underlying Tangram JS. So the "scene.yaml" file has to be in the /www folder of the shinyApp.
I am not sure how it would be possible to use absolute paths to the .yaml file, which are not inside the /www folder. Currently the browser throws those errors with an absolute path:
Not allowed to load local resource:
Tangram v0.20.0 [error]: Scene.load() failed to load
We could maybe use the shiny::addResourcePath() function, if an absolute path is given? But I am not sure if that is an elegant solution or if there is a better way?
I also added an option to load either the minified or full JS-sources of Tangram.
With options("leaflet.extras.minified" = FALSE) you get the full version.
The default is TRUE.
Adds support for Tangram Vector Tiles:
This works currently only in a shinyApp opened in the browser, since a "scene.yaml" file is passed to the underlying Tangram JS. So the "scene.yaml" file has to be in the /www folder of the shinyApp.
I am not sure how it would be possible to use absolute paths to the .yaml file, which are not inside the /www folder. Currently the browser throws those errors with an absolute path:
We could maybe use the
shiny::addResourcePath()
function, if an absolute path is given? But I am not sure if that is an elegant solution or if there is a better way?I also added an option to load either the minified or full JS-sources of Tangram. With
options("leaflet.extras.minified" = FALSE)
you get the full version. The default is TRUE.