diff --git a/images/earth.html b/images/earth.html
index 825826a252b2f431d886f4126d0c6559c8d6907b..2f6a70aa8bb20691d6848210c230fc323f4e1d33 100644
--- a/images/earth.html
+++ b/images/earth.html
@@ -142,8 +142,7 @@ function createAircraft(id, type, color)
aircraft[id] = planePlacemark;
attitudes[id] = planeOrient;
aircraftLocations[id] = planeLoc;
- aircraftLastLocations[id] = ge.createLocation('');
- aircraftColors[id] = color;
+ aircraftLastLocations[id] = ge.createLocation('');
//planeColor = color;
createTrail(id, color);
@@ -190,12 +189,6 @@ function showTrail(id)
trailsVisible[id] = true;
}
-function startTrail(id)
-{
- createTrail(id, trailColors[id]);
- trailsVisible[id] = true;
-}
-
function setViewRange(dist)
{
currViewRange = dist;
diff --git a/src/ui/map3D/QGCGoogleEarthView.cc b/src/ui/map3D/QGCGoogleEarthView.cc
index c72e3ee36cf70b0f1ff365eb9fa20121d97e832f..52cbb30f0b825769eb144c9eeaba930756e57b27 100644
--- a/src/ui/map3D/QGCGoogleEarthView.cc
+++ b/src/ui/map3D/QGCGoogleEarthView.cc
@@ -151,20 +151,6 @@ void QGCGoogleEarthView::updateGlobalPosition(UASInterface* uas, double lon, dou
//qDebug() << QString("addTrailPosition(%1, %2, %3, %4);").arg(uas->getUASID()).arg(lat, 0, 'f', 15).arg(lon, 0, 'f', 15).arg(alt, 0, 'f', 15);
}
-void QGCGoogleEarthView::clearTrail()
-{
- // Check if the current trail has to be hidden
- if (trailEnabled && !state)
- {
- QList mavs = UASManager::instance()->getUASList();
- foreach (UASInterface* currMav, mavs)
- {
- javaScript(QString("clearTrail(%1);").arg(currMav->getUASID()));
- javaScript(QString("startTrail(%1);").arg(currMav->getUASID()));
- }
- }
-}
-
void QGCGoogleEarthView::showTrail(bool state)
{
// Check if the current trail has to be hidden
@@ -173,7 +159,7 @@ void QGCGoogleEarthView::showTrail(bool state)
QList mavs = UASManager::instance()->getUASList();
foreach (UASInterface* currMav, mavs)
{
- javaScript(QString("clearTrail(%1);").arg(currMav->getUASID()));
+ javaScript(QString("hideTrail(%1);").arg(currMav->getUASID()));
}
}
@@ -358,9 +344,6 @@ void QGCGoogleEarthView::initializeGoogleEarth()
ui->trailCheckbox->setChecked(trailEnabled);
connect(ui->trailCheckbox, SIGNAL(toggled(bool)), this, SLOT(showTrail(bool)));
- // Clear trail button
- connect(ui->clearTrailButton, SIGNAL(clicked()), this, SLOT(clearTrail()));
-
// Go home
connect(ui->goHomeButton, SIGNAL(clicked()), this, SLOT(goHome()));
diff --git a/src/ui/map3D/QGCGoogleEarthView.h b/src/ui/map3D/QGCGoogleEarthView.h
index c9c84f079cb84b9fa1cbc5b818b0f943a879416e..80131dc7ed1079d3a23d133a797a2a4169c0450f 100644
--- a/src/ui/map3D/QGCGoogleEarthView.h
+++ b/src/ui/map3D/QGCGoogleEarthView.h
@@ -82,8 +82,6 @@ public slots:
void setActiveUAS(UASInterface* uas);
/** @brief Update the global position */
void updateGlobalPosition(UASInterface* uas, double lon, double lat, double alt, quint64 usec);
- /** @brief Clear the existing vehicle trails */
- void clearTrail();
/** @brief Show the vehicle trail */
void showTrail(bool state);
/** @brief Show the waypoints */