ramnathv / rMaps

Interactive Maps from R
http://rmaps.github.io
389 stars 194 forks source link

Leaflet$setTemplate not adding afterScript #51

Closed jmsims2 closed 10 years ago

jmsims2 commented 10 years ago

I am trying to recreate the example here: http://rmaps.github.io/blog/posts/leaflet-heat-maps/index.html

When I run L2$setTemplate with the afterScript defined and then load the map, the script doesn't get injected into the html. I followed the tutorial exactly...can't quite find why the setTemplate method doesn't appear to be working?

ramnathv commented 10 years ago

You need to have the dev version of rCharts installed for that to work. I added the afterScript parameter in the dev version as an experimental feature. I will move it to the master once the API is stable. So, install using

library(devtools)
install_github("ramnathv/rCharts@dev")

You should be able to get things working then.

jmsims2 commented 10 years ago

That did it! Thanks so much for the reply, I appreciate the help!