Note that there are some explanatory texts on larger screens.

plurals
  1. POWhats the issue with the android emulator to display map in Web View
    primarykey
    data
    text
    <p>What i am getting is a blank white screen in my emulator and the map doesn't display. Here is what is suppose to be displayed in a browser: <a href="http://code.google.com/apis/maps/documentation/javascript/examples/layer-georss.html" rel="nofollow">http://code.google.com/apis/maps/documentation/javascript/examples/layer-georss.html</a> Here's the code for manifest file:</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.apps.mylocations" android:versionCode="1" android:versionName="1.0"&gt; &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt; &lt;activity android:name=".MyLocations" 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;/application&gt; &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;/manifest&gt; </code></pre> <p></p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" &gt; &lt;WebView android:id="@+id/web_engine" android:layout_width="fill_parent" android:layout_height="fill_parent" /&gt; &lt;/LinearLayout&gt; package com.apps.mylocations; import android.app.Activity; import android.os.Bundle; import android.webkit.WebView; public class MyLocations extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView engine = (WebView) findViewById(R.id.web_engine); engine.getSettings().setJavaScriptEnabled(true); String data = "&lt;html&gt;" + "&lt;head&gt;" + "&lt;meta name=\"viewport\" content=\"initial-scale=1.0, user-scalable=no\" /&gt;" + "&lt;meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\"/&gt;" + "&lt;title&gt;Google Maps JavaScript API v3 Example: KmlLayer GeoRSS&lt;/title&gt;" + "&lt;link href=\"http://code.google.com/apis/maps/documentation/javascript/examples/default.css\" rel=\"stylesheet\" type=\"text/css\" /&gt;" + "&lt;script type=\"text/javascript\" src=\"http://maps.google.com/maps/api/js?sensor=false\"&gt;&lt;/script&gt;" + "&lt;script type=\"text/javascript\"&gt;" + "function initialize() {" + "var myLatlng = new google.maps.LatLng(49.496675,-102.65625);" + "var myOptions = {" + "zoom: 4," + "center: myLatlng," + "mapTypeId: google.maps.MapTypeId.ROADMAP" + "}" + "var map = new google.maps.Map(document.getElementById(\"map_canvas\"), myOptions);" + "var georssLayer = new google.maps.KmlLayer('http://api.flickr.com/services/feeds/geo/?g=322338@N20&amp;lang=en-us&amp;format=feed-georss');" + "georssLayer.setMap(map);" + "}" + "&lt;/script&gt;" + "&lt;/head&gt;" + "&lt;body onload=\"initialize()\"&gt;" + "&lt;div id=\"map_canvas\"&gt;&lt;/div&gt;" + "&lt;/body&gt;" + "&lt;/html&gt;"; engine.loadData(data, "text/html", "UTF-8"); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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