track2shp <- function(track, fname = 'testshp', proj4string =CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ")){
coords = coordinates(track[,8:9])
out = SpatialPointsDataFrame(coords, track, coords.nrs = numeric(0), proj4string = proj4string, match.ID = TRUE, bbox = NULL)
writePointsShape(out, fname, factor2char = TRUE, max_nchar=254)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.