Export track data to a KML file, for use in Google Earth the continuous time slider.
Arguments
- id
vector of grouping IDs (or a trip object)
- lon
vector of longitude (ignored if id is a trip)
- lat
vector of latitude (ignored if id is a trip)
- utc
vector of POSIXct date-times (ignored if id is a trip)
- z
vector of elevations, this cannot be set if 'id' is a trip
- kml_file
filename for KML (KML or KMZ) (must end in .kml or .kmz)
- name
internal name of dat (derived from kml_file if not specified)
- altitude_mode
the altitude mode, 'absolute', 'clampToGround', 'clampToSeaFloor', 'relativeToGround', or 'relativeToSeaFloor', see Details
Details
To include altitude set every argument explicitly, by input of separate 'id', 'lon', 'lat', 'utc' and 'z' arguments. If the first argument 'id' is a trip object there is no facility to include the 'z' altitude values.
If 'z' is included it is applied as a third coordinate, with 'altitude_mode' controlling the interpretation, see https://developers.google.com/kml/documentation/altitudemode. If the 'kml_file' ends with ".kmz" the file is compressed, otherwise it must end with ".kml" and the compression archive step is not applied.
Sadly the interactive time slider is only available with the desktop version of Google Earth, the data loads into the browser version but can't be interactive.