我试图做相关application.While一个谷歌地图这样做,应用程序,我得到了一些problems.This是我的xml文件谷歌地图应用
< LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.android.maps.MapView
android:id="@+id/mapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="0uw2roKAecBgrtyYUPVL-pJ84Ez4tfHTilFZCGw"/>
<LinearLayout android:id="@+id/zoom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
/>
</LinearLayout>
这是我的java文件
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
mapView = (MapView) findViewById(R.id.mapView);
LinearLayout zoomLayout = (LinearLayout)findViewById(R.id.zoom);
View zoomView = mapView.getZoomControls();
zoomLayout.addView(zoomView,
new LinearLayout.LayoutParams(
LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));
mapView.displayZoomControls(true);
}
我得到这个应用程序的谷歌地图视图,但没有放大。 如果我先改变我得到变焦options..what输出是线性layout.Pls的问题告诉我的朋友
感谢所有....现在它的工作..... – Sarath 2011-06-15 04:58:16