private File writeTo(Posicion[] posiciones, boolean linea, boolean showTime) {
File file = null;
try {
file = File.createTempFile("Historico", ".gpx");
GpxData data = new GpxData();
ImmutableGpxTrack track = new ImmutableGpxTrack(
new LinkedList<Collection<WayPoint>>(),
new LinkedHashMap<String, Object>());
LinkedList<WayPoint> linkedList = new LinkedList<WayPoint>();
if (posiciones != null) {
for (Posicion pos : posiciones) {