# get image info from Wikimedia:
imagename = "Soil_monolith.jpg"
x1 <- getWikiMedia.ImageInfo(imagename)
sm <- spPhoto(filename = x1$url$url, exif.info = x1$metadata)
kml_open("sm.kml")
kml_layer(sm, method="monolith")
kml_close("sm.kml")
# compress together both the KML file and the auxiliary COLLADA file:
kml_compress("sm.kml", files="Soil_monolith_jpg.dae")
Run the code above in your browser using DataLab