传递arraylist从mapactivity覆盖类

时间:2012-09-19 13:59:56

标签: android eclipse google-maps point google-polyline

我想将mapactivity中的值的arraylist传递给overlay类:

 MyOverlay dataOverlay = new MyOverlay(loc);

在overlay类中创建一个构造函数:

public class MyOverlay {

public MyOverlay(List<Double> loc) {
    // TODO Auto-generated constructor stub
    GeoPoint point = new GeoPoint((int)(location.get(1)*1E6) , (int)(location.get(0)*1E6));
}
public void draw(Canvas canvas, MapView mapView, boolean shadow, GeoPoint mp){

     super.draw(canvas, mapView, shadow, mp);
}

}

从这个loc arraylist我想从其余的值中绘制一个点和mnay折线。此地理位置无法传递到绘图类。

传递后的下一步是什么?如何在draw方法中访问此loc?

0 个答案:

没有答案