My goal is to plot a route. Using RStudio it is working properly but when I want to use it in Shiny it is only plotting the map but not the route. Anyone has a solution for this? Also if I run the script in the R console, it is not working neither...only works in RStudio.
Hi there,
I am following this example:
https://gist.github.com/ramnathv/9998388
My goal is to plot a route. Using RStudio it is working properly but when I want to use it in Shiny it is only plotting the map but not the route. Anyone has a solution for this? Also if I run the script in the R console, it is not working neither...only works in RStudio.
THanks!
library(rMaps)
library(rCharts)
map = Leaflet$new() map$setView(c(40.74119, -73.9925), 13) map$tileLayer(provider = 'Stamen.TonerLite')
mywaypoints = list(c(40.74119, -73.9925), c(40.73573, -73.99302))
map$addAssets( css = "http://www.liedman.net/leaflet-routing-machine/dist/leaflet-routing-machine.css", jshead = "http://www.liedman.net/leaflet-routing-machine/dist/leaflet-routing-machine.min.js" )
routingTemplate = "
" map$setTemplate( afterScript = sprintf(routingTemplate, RJSONIO::toJSON(mywaypoints)) ) map$set(width = 800, height = 800) map