之前,我在 Android Map API v1 中创建了一个扩展 GeoPoint 的类:
class CyclePoint extends GeoPoint {
public float accuracy;
public double altitude;
public float speed;
public double time;
public CyclePoint(int lat, int lgt, double currentTime) {
super(lat, lgt);
this.time = currentTime;
}
public CyclePoint(int lat, int lgt, double currentTime, float accuracy) {
super(lat, lgt);
this.time = currentTime;
this.accuracy = accuracy;
}
public CyclePoint(int lat, int lgt, double currentTime, float accuracy, double altitude, float speed) {
super(lat, lgt);
this.time = currentTime;
this.accuracy = accuracy;
this.altitude = altitude;
this.speed = speed;
}
}
现在我正在切换到 V2,我应该扩展什么?应该是LatLng吗?但是当我切换到 LatLng 时,它说:类型 CyclePoint 不能继承最终类 LatLng。谁能帮我这个?非常感谢!