Note that there are some explanatory texts on larger screens.

plurals
  1. POmapview using api v2 key
    text
    copied!<p>I am using mapview in layout and api v2 key but map is not displayed. My question is...Can I use v2<br> key in mapview or I will have to use mapfragment. </p> <p>main.xml</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;com.google.android.maps.MapView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/map_view" android:layout_width="fill_parent" android:layout_height="fill_parent" android:clickable="true" android:enabled="true" android:apiKey="my_apikey" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>manifest.xml</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.fpa" android:versionCode="1" android:versionName="1.0"&gt; &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt; &lt;activity android:name="com.example.fpa.GMapsActivity" android:label="@string/app_name"&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;uses-library android:name="com.google.android.maps" /&gt; &lt;/application&gt; &lt;uses-permission android:name="android.permission.INTERNET"/&gt; &lt;/manifest&gt; </code></pre> <p>getting output as follows: <img src="https://i.stack.imgur.com/19rKC.png" alt="enter image description here"></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