forked from upstream-mirrors/OpenTracks
TrackPoint has Location as delegate instead of inheritance.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package de.dennisguse.opentracks.content.data;
|
||||
|
||||
import android.location.Location;
|
||||
|
||||
public class TestDataUtil {
|
||||
|
||||
public static final double INITIAL_LATITUDE = 37.0;
|
||||
@@ -30,12 +32,12 @@ public class TestDataUtil {
|
||||
* @return created location
|
||||
*/
|
||||
public static TrackPoint createTrackPoint(int i) {
|
||||
TrackPoint trackpoint = new TrackPoint("test");
|
||||
trackpoint.setLatitude(INITIAL_LATITUDE + (double) i / 10000.0);
|
||||
trackpoint.setLongitude(INITIAL_LONGITUDE - (double) i / 10000.0);
|
||||
trackpoint.setAccuracy((float) i / 100.0f);
|
||||
trackpoint.setAltitude(i * ALTITUDE_INTERVAL);
|
||||
trackpoint.setTime(i + 1);
|
||||
return trackpoint;
|
||||
Location location = new Location("test");
|
||||
location.setLatitude(INITIAL_LATITUDE + (double) i / 10000.0);
|
||||
location.setLongitude(INITIAL_LONGITUDE - (double) i / 10000.0);
|
||||
location.setAccuracy((float) i / 100.0f);
|
||||
location.setAltitude(i * ALTITUDE_INTERVAL);
|
||||
location.setTime(i + 1);
|
||||
return new TrackPoint(location);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user