在当前位置添加叠加层时出错

时间:2011-05-13 21:51:01

标签: android

how to add overlay item in my current location in this code 这是我在当前位置添加超量项目的代码,但我收到此错误

enter code here
public class MyLocationListener implements LocationListener

{ @Override

 public void onLocationChanged(Location loc)

           {





GeoPoint point = new GeoPoint(    (int) (loc.getLatitude() * 1E6), 
        (int) (loc.getLongitude() * 1E6));
 mapOverlays = mapView.getOverlays();
drawable11 = this.getResources().getDrawable(R.drawable.vitblue);
itemizedOverlay11= new HelloItemizedOverlay(drawable11,this);
OverlayItem over11 = new OverlayItem(point, "offff", "over5");


itemizedOverlay11.addOverlay(over11);

//构造函数HelloItemizedOverlay(Drawable,tryanabtry.MyLocationListener)未定义

1 个答案:

答案 0 :(得分:0)

确保在项目中包含HelloItemizedOverlay类,并正确调用构造函数....