0

Here is my code for displaying static google map in android application using html,But when i open the activity it shows blank. please help me to solve the issue,im new in android,

JAVA

WebView overview = (WebView) findViewById(R.id.googlemap_webView);
        overview.loadUrl("file:///android_asset/content/googlelocation.html");  

googlelocation.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<iframe width="600" height="450" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/place?q=Crescent%20Builders%2C%20Cherooty%20Road%2C%20Vellayil%2C%20Calicut%2C%20Kerala%2C%20India&key=AIzaSyCeBlSt-PVun7-08LrM6mIS5Nd0NCRVpDM"></iframe>
</body>
</html>
Ashfaq
  • 27
  • 7

1 Answers1

0

Static maps have been added in the last version of Google Maps for Android. See https://developers.google.com/maps/documentation/android/lite

Unless you have a good reason to use the web version, Android specific one will work better.

azertiti
  • 3,150
  • 17
  • 19