hi i am using a mapview in my application.it showing correctly but the problem is when i touch map view its not moving if a user want to see nearby location he cant move to that location.you can say that mapview is not responding to touchevent in my layout.here is my layout code
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFF">
<TextView
android:id="@+id/name"
android:layout_width="fill_parent"
android:layout_height="50px"
android:textSize="20sp"
/>
<TextView
android:id="@+id/link"
android:layout_width="fill_parent"
android:layout_height="50px"
android:autoLink="web"/>
<TextView
android:id="@+id/department"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/count"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/location"
android:layout_width="fill_parent"
android:layout_height="80px" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/longitude"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:id="@+id/latitude"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/zoomin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="ZoomIn"/>
<Button
android:id="@+id/zoomout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Zoom Out"/>
</LinearLayout>
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:apiKey="0PmsmqKFKflNmHXD2fwG_vPWnR2gA-YB2QVlIQA"
android:layout_weight="2"
/>
</LinearLayout>
moving to different location when any view is any location is touched by default can any one please tell why its not moving and what should i do so that on touch event it will move.
If i understand your problem correctly its that when you try to move around the map its not doing anything.. It might help to add theese two lines inside your XML
It should look like this inside your snippet:
So try add the two lines inside your XML at the MapView object and it should work.