Hi,

I'm using code from http://plotkml.r-forge.r-project.org/tutorial.php :

library(fossil);library(adehabitat);library(ade4);library(plotKML)
data(gpxbtour)
gpxbtour$ctime <- as.POSIXct(gpxbtour$time, format="%Y-%m-%dT%H:%M:%SZ")
coordinates(gpxbtour) <- ~lon+lat
proj4string(gpxbtour) <- CRS("+proj=longlat +datum=WGS84")
xy <- as.list(data.frame(t(coordinates(gpxbtour))))
gpxbtour$dist.km <- sapply(xy, function(x) { deg.dist(long1=x[1], lat1=x[2], long2=xy[[1]][1], lat2=xy[[1]][2]) } )> library(spacetime)
gpx.ltraj <- as.ltraj(coordinates(gpxbtour), gpxbtour$ctime, id = "th")
gpx.st <- as(gpx.ltraj, "STTDF")
gpx.st$speed <- gpxbtour$speed
gpx.st@sp@proj4string<mailto:gpx.st@sp@proj4string> <- CRS("+proj=longlat +datum=WGS84")
plotKML(gpx.st, colour="speed",kmz=FALSE)

Which runs, but produces a different image than the one on the web page.

The key difference is that the web image has a playback widget and mine does not.

The reason the difference matters to me is that I want to use the play back feature to show how the system evolves with time.

My question is "how do I get the play back facility to appear?"

Also, I would like to show only the latest point in charts like this, rather than have the tails showing all previous positions. This is because I am working towards showing multiple vehicles, with crisscrossing paths, and the tails turn into a web. The example on the web page above the one I have shown has a good example of where the whole history of a trajectory is shown, not just the most recent point.

(beginner by the way!)


This email is confidential and may also be privileged.  If you are not the intended recipient, please notify us immediately and delete this message from your system without first printing or copying it. Any personal data in this email (including any attachments) must be handled in accordance with the Rio Tinto Group Data Protection Policy and all applicable data protection laws.



	[[alternative HTML version deleted]]

