ramnathv / rMaps

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

How to share properly? #2

Closed lcolladotor closed 10 years ago

lcolladotor commented 10 years ago

Hello,

I'm sure that a sharing feature will be implemented later. But well, I was just wondering how you would do it now?

I for example made example 3 sharable by looking at the HTML, copying some of the files, and editing the paths in the HTML file. I then uploaded them here: http://www.biostat.jhsph.edu/~lcollado/misc/rMaps/file5d8743376948.html

Cheers, Leo

ramnathv commented 10 years ago

Sharing should work the same way as in rCharts. So for this example, you would do the following to share:

map$publish("Publishing from rMaps")

which would upload it to gist and return a link to view the chart

http://rcharts.io/viewer/?8919491

Currently, this feature should work with Leaflet and DataMaps, since all I did was move them from rCharts to rMaps. For Crosslet, it is a little more challenging, but eventually the publish method is the way to go.

lcolladotor commented 10 years ago

Excellent! Thanks for the info =)

ramnathv commented 10 years ago

You are welcome. You can also publish to RPubs by passing the argument host = "rpubs" to the publish method. I plan to add a dropbox host as well.