我正在尝试找到一种方法来在我的纬度上放置一个精确的标记,在谷歌地图上。
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import android.os.Bundle;
public class Nav10 extends MapActivity {
MapController mControl;
GeoPoint GeoP;
MapView navView10;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.nav10);
navView10 = (MapView) findViewById(R.id.navView10);
navView10.displayZoomControls(true);
navView10.setBuiltInZoomControls(true);
navView10.setSatellite(true);
double lat = 40.325874;
double longi = -76.002211;
GeoP = new GeoPoint((int) ( lat *1E6), (int) (longi * 1E6));
mControl = navView10.getController();
mControl.animateTo(GeoP);
mControl.setZoom(20);
}
@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
}
如何使用此代码插入精确标记?