このエラーが発生しています java.lang.ClassCastException: [Ljava.lang.Object; ポイントのリストからルートを描画する際に、ここに私の描画コードがあります
public class MyOverlay extends Overlay{
List<Double> location;
List<Double> lt;
List<Double> ln;
MapView mapView ;
Double[]lat;
Double[]lon;
public MyOverlay(List<Double> location, List<Double> lt, List<Double> ln, MapView mapView) {
// TODO Auto-generated constructor stub
this.location = location;
this.mapView = mapView;
this.ln =ln;
this.lt = lt;
}
@Override
public void draw(android.graphics.Canvas canvas, MapView mapView, boolean shadow) {
super.draw(canvas, mapView, false);
lat = (Double[])lt.toArray();
lon = (Double[]) ln.toArray();
Path path1 = new Path();
Point p1 = new Point();
Path path2 = new Path();
Point p2 = new Point();
Point p3 = new Point();
Point p4 = new Point();
Projection projection = mapView.getProjection();
int a = lat.length;
int b = lon.length;
int sum = a+b;
Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setColor(Color.RED);
paint.setStyle(Paint.Style.STROKE);
paint.setStrokeWidth(5);
paint.setAlpha(90);
Path p = new Path();
Point from = new Point();
Point to = new Point();
for (int i = 1; i < sum; i++)
{
if (i == sum - 1)
{
break;
}
GeoPoint point1 = new GeoPoint((int)(lat[i]*1E6) , (int)(lon[i]*1E6));
(int)(Double.valueOf(lon[i+1])*1E6));
projection.toPixels( point1, from);
//projection.toPixels(point2, to);
if(i ==1)
{
p.moveTo(from.x, from.y);
}
else
{
p.lineTo(to.x, to.y);
}
canvas.drawPath(p, paint);
}
私が間違っていることを教えてください。