JavaFX:WebView是否支持地理定位? [英] JavaFX : Does WebView support geolocation?
问题描述
我目前正在使用WebView在JavaFX中进行项目.我的应用程序有望检索用户的当前位置(经度和纬度).我正在尝试通过html文件在WebView中使用 navigator.geolocation.getCurrentPosition(showPosition);
,但它似乎无法正常工作.
WebView是否支持地理定位?如果没有,我可以使用什么方法来检索位置?
否,WebView不支持地理定位.
在Webview中加载
测试的系统为:Java 8u72,OS X 10.9.5,MacBook Pro Retina2015.
如果没有,我可以使用哪些方法来检索位置?
我没有任何建议.
I am currently doing project in JavaFX with the use of WebView. My application is expected to retrieve currrent location (lattitude and longitude) of the user. I am trying to use navigator.geolocation.getCurrentPosition(showPosition);
in the WebView via html file, but it doesn't seem to be working.
Does WebView support geolocation? If not, what methods can I apply to retrieve the location?
No, WebView does not support Geolocation.
Loading https://html5test.com up in a Webview reports a negative on Geolocation support:
System tested was: Java 8u72, OS X 10.9.5, MacBook Pro Retina 2015.
If not, what methods can I apply to retrieve the location?
I do not have any suggestions.
这篇关于JavaFX:WebView是否支持地理定位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!