{"id":7070,"date":"2014-05-19T04:11:54","date_gmt":"2014-05-19T04:11:54","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/05\/19\/loading-a-maps-api-site-in-a-native-android-application-collection-of-common-programming-errors\/"},"modified":"2014-05-19T04:11:54","modified_gmt":"2014-05-19T04:11:54","slug":"loading-a-maps-api-site-in-a-native-android-application-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/05\/19\/loading-a-maps-api-site-in-a-native-android-application-collection-of-common-programming-errors\/","title":{"rendered":"Loading a Maps API site in a Native Android Application-Collection of common programming errors"},"content":{"rendered":"<p>Filtered it down to<\/p>\n<pre><code>private void setupWebView() {\n        \/*\n            final String centerURL = \"javascript:centerAt(\"\n                    + mostRecentLocation.getLatitude() + \",\"\n                    + mostRecentLocation.getLongitude() + \")\";\n            webView = (WebView) findViewById(R.id.webview);\n            webView.getSettings().setJavaScriptEnabled(true);\n            \/\/ Wait for the page to load then send the location information\n            webView.setWebViewClient(new WebViewClient() {\n                @Override\n                public void onPageFinished(WebView view, String url) {\n                    webView.loadUrl(centerURL);\n                }\n\n            });*\/\n            webView = (WebView) findViewById(R.id.webview);\n            webView.loadUrl(MAP_URL);\n    }\n<\/code><\/pre>\n<p>Bit easier to filter out the actual issue when you know which bit doesnt work thanks to CommonsWare for the great book, poking through that and test-code that ACTUALLY WORKS made it a bit easier to work out what was going on. And thanks for the debug info :o)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Filtered it down to private void setupWebView() { \/* final String centerURL = &#8220;javascript:centerAt(&#8221; + mostRecentLocation.getLatitude() + &#8220;,&#8221; + mostRecentLocation.getLongitude() + &#8220;)&#8221;; webView = (WebView) findViewById(R.id.webview); webView.getSettings().setJavaScriptEnabled(true); \/\/ Wait for the page to load then send the location information webView.setWebViewClient(new WebViewClient() { @Override public void onPageFinished(WebView view, String url) { webView.loadUrl(centerURL); } });*\/ webView = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7070","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7070","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7070"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7070\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7070"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7070"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7070"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}