library(RKML)
dyn = createUpdatingDoc("foo.kml")
saveXML(dyn, "dyn.kml")
data(USCities)
foo = kml( ~ longitude + latitude, USCities[1:50,])
saveXML(foo, "foo.kml")
system("open dyn.kml")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.