0

I am running my R script to create leaflets on my linux machine (ec2 instance) on AWS. I was able to create a leaflet on R (using the leaflet package). I saved the leaflet using saveWidget (htmlwidgets package). I scp the html file to my local machine and try to view it but it is blank. I don't see any tiles or layers that I had generated on my leaflet. All I can see is white background. I am not sure what went wrong. saveWidget(widget = m, file = "test.html")

user3119875
  • 151
  • 3
  • 14
  • I think this issue is addressed [here](http://stackoverflow.com/questions/30336235/how-to-access-map-generated-by-leaflet-in-r) in a former discussion – Edu Jun 21 '16 at 20:37
  • thank you for your reply. Yes I did look into it, but that did not resolve the issue. – user3119875 Jun 21 '16 at 21:36

1 Answers1

2

I figured out the issue , thought it would be worthwhile to share. The issue was how htmlWidget was writing the html file on my linux machine. Basically a syntax problem. Instead of href =\"http://openstreetmap.org\" it was outputting href="\"http://openstreetmap.org\"". All you have to do is convert "\" and \"" to \" and you will be good to go (Can be done by a simple python script)

user3119875
  • 151
  • 3
  • 14