WebView 加载地图

这个问题困惑了好久,结果,呵呵,看如下配置:

webView = (WebView) findViewById(R.id.bottom_life_web);
webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
settings = webView.getSettings();
settings.setSupportZoom(true);
settings.setBuiltInZoomControls(true);
settings.setDisplayZoomControls(false);
settings.setDomStorageEnabled(true);
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setLoadWithOverviewMode(true);

settings.setAllowFileAccess(true);
settings.setAppCacheMaxSize(1024 * 1024 * 9);// 设置缓冲大小
settings.setAppCacheEnabled(true);
settings.setJavaScriptEnabled(true);
webView.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);

你可能感兴趣的:(Android)