這是我的位置,長和lattitudes它的工作,但我需要做指針放在那裏,是possible.and還需要知道我能寫什麼我在地圖上的位置,PLZ任何機構幫助我我需要在MapView上做一個指針,該怎麼做?
package com.emigostec;
import android.os.Bundle;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
public class GmapviewActivity extends MapActivity {
/** Called when the activity is first created. */
double lat=17.44764,lon=78.50882;
GeoPoint gp;
MapController mc;
MapView mv;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mv=(MapView)findViewById(R.id.mapView);
gp=new GeoPoint((int)(lat*1000000),(int)(lon*1000000));
mc=mv.getController();
mc.setCenter(gp);
mc.setZoom(25);
mv.setSatellite(true);
}
@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
}
你需要使用覆蓋,請參考這個http://developer.android.com/resources/tutorials/views/hello-mapview.html – Abhi