forked from upstream-mirrors/OpenTracks
Merge heads
This commit is contained in:
+14
-8
@@ -56,14 +56,20 @@ public class SendFusionTablesUtils {
|
|||||||
Log.e(TAG, "Invalid track");
|
Log.e(TAG, "Invalid track");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
double latE6;
|
||||||
// TODO(jshih): Determine the correct bounding box and zoom level that
|
double lonE6;
|
||||||
// will show the entire track.
|
int z;
|
||||||
TripStatistics stats = track.getTripStatistics();
|
if (track.getNumberOfPoints() < 2) {
|
||||||
double latE6 = stats.getBottom() + (stats.getTop() - stats.getBottom()) / 2;
|
// Use Google's latitude and longitude
|
||||||
double lonE6 = stats.getLeft() + (stats.getRight() - stats.getLeft()) / 2;
|
latE6 = 37.423 * 1.E6;
|
||||||
int z = 15;
|
lonE6 = -122.084 * 1.E6;
|
||||||
|
z = 2;
|
||||||
|
} else {
|
||||||
|
TripStatistics stats = track.getTripStatistics();
|
||||||
|
latE6 = stats.getBottom() + (stats.getTop() - stats.getBottom()) / 2;
|
||||||
|
lonE6 = stats.getLeft() + (stats.getRight() - stats.getLeft()) / 2;
|
||||||
|
z = 15;
|
||||||
|
}
|
||||||
// We explicitly format with Locale.US because we need the latitude and
|
// We explicitly format with Locale.US because we need the latitude and
|
||||||
// longitude to be formatted in a locale-independent manner. Specifically,
|
// longitude to be formatted in a locale-independent manner. Specifically,
|
||||||
// we need the decimal separator to be a period rather than a comma.
|
// we need the decimal separator to be a period rather than a comma.
|
||||||
|
|||||||
Reference in New Issue
Block a user