我有一個奇怪的問題...我有一個服務器API,我已經安裝了JVectorMap javascripts來顯示地圖上的一些統計數據。這是非常簡單的我只需要在URL設置爲網頁視圖這樣的:WebView控制檯在android <4.0 |上顯示錯誤(JVectorMap)
(的WebView配置)
WebView wv = (WebView)lv_header.findViewById(R.id.result_webview);
WebSettings settings = wv.getSettings();
settings.setBuiltInZoomControls(false);
settings.setUseWideViewPort(true);
settings.setJavaScriptEnabled(true);
settings.setLoadsImagesAutomatically(true);
settings.setDomStorageEnabled(true);
settings.setLoadWithOverviewMode(true);
wv.setHorizontalScrollBarEnabled(false);
的WebView方法我打電話顯示地圖
private void setWebView(String countryCode) {
wv.loadUrl(MyApplication.API_URL_SERVER_PRODUCTION+"/query/"+getIdFromPos(array_id, posInArray)+"/map/"+countryCode);
}
在Android 4.x版>將顯示確定一切正常,但在4.x下我有這個日誌; (和Webview是空白):
E/Web Console(8411): Uncaught TypeError: Object #<an HTMLDocument> has no method: 'createStyleSheet' at http://www.miwebsite.com/static/js/jvectormap/jquery-jvectormap-1.2.2.min.js:7
法 'createStyleSheet' 這是在 「jQuery的jvectormap-1.2.2.min.js」 文件...
地圖的例子==>Click Here
感謝您的幫助!給我這個問題的線是524,說==> if(!jvm.WorldMap.maps [this.params.map])拋出新的錯誤(「嘗試使用未加載的映射:」+ this.params。地圖);在android <4.0上導致此問題的原因是什麼? – Jason
我不認爲它與android或jvectormap有任何關係。很可能您沒有鏈接到正確的地圖,例如jquery-jvectormap-us-aea-en.js必須具有映射:'us_aea_en'或jquery-jvectormap-fr-merc-en.js必須具有映射:'fr_merc_en'。 – itmitica
適用於Android 4.0和iOS。但在Android <4.0只適用於非Android默認瀏覽器(例如:Firefox) – Jason