0
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(可繪製,tryanabtry.MyLocationListener)是未定義
相信我有helloitemized覆蓋,但這個問題我怎樣才能調用構造函數正確地,它總是給出錯誤 – wowo 2011-05-13 22:15:32
後,它強制關閉,當我運行程序 – wowo 2011-05-13 23:07:13
後,我曾被問過同樣的事情,以及我認爲構造函數中的第二個參數是上下文,通過在這裏嘗試你的代碼.... – Farhan 2011-05-14 19:49:04