JavaFX:WebView 是否支持地理定位?
JavaFX : Does WebView support geolocation?
我目前正在使用 WebView 在 JavaFX 中做项目。我的应用程序需要检索用户的当前位置(纬度和经度)。我试图通过 html 文件在 WebView 中使用 navigator.geolocation.getCurrentPosition(showPosition);
,但它似乎不起作用。
WebView 是否支持地理定位?如果没有,我可以应用什么方法来检索位置?
不,WebView 不支持地理定位。
在 Webview 中加载 https://html5test.com 报告对地理位置支持的负面影响:
测试的系统是:Java 8u72,OS X 10.9.5,MacBook Pro Retina 2015。
If not, what methods can I apply to retrieve the location?
我没有任何建议。
我目前正在使用 WebView 在 JavaFX 中做项目。我的应用程序需要检索用户的当前位置(纬度和经度)。我试图通过 html 文件在 WebView 中使用 navigator.geolocation.getCurrentPosition(showPosition);
,但它似乎不起作用。
WebView 是否支持地理定位?如果没有,我可以应用什么方法来检索位置?
不,WebView 不支持地理定位。
在 Webview 中加载 https://html5test.com 报告对地理位置支持的负面影响:
测试的系统是:Java 8u72,OS X 10.9.5,MacBook Pro Retina 2015。
If not, what methods can I apply to retrieve the location?
我没有任何建议。