Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle API Map Zoom
    text
    copied!<pre><code> import com.google.android.maps.MapActivity; import com.google.android.maps.MapView; import android.os.Bundle; public class Map2Activity extends MapActivity { /** Called when the activity is first created. */ MapView map; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); map = (MapView)findViewById(R.id.mvMain); map.setBuiltInZoomControls(true); } @Override protected boolean isRouteDisplayed() { // TODO Auto-generated method stub return false; } } </code></pre> <p>Manifest file</p> <pre><code>&lt;uses-sdk android:minSdkVersion="8"/&gt; &lt;uses-permission android:name="android.permission.INTERNET"/&gt; &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/&gt; &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/&gt; &lt;application android:icon="@drawable/ic_launcher" android:label="@string/app_name" &gt; &lt;uses-library android:name="com.google.android.maps" /&gt; </code></pre> <p>main.xml</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" &gt; &lt;com.google.android.maps.MapView android:layout_width="fill_parent" android:layout_height="fill_parent" android:apiKey="01VR0PIBfyfgbR5DlOlcEBPG9F5WfE7ZBPg" android:tag="@+id/mvMain" android:enabled="true" android:clickable="true" /&gt; &lt;/LinearLayout&gt; </code></pre> <p>i am not getting the map with these two statements (forcebly closing the app) map = (MapView)findViewById(R.id.mvMain); map.setBuiltInZoomControls(true);<br> if it has to work what do i need to give?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload