问题描述
我使用Worklight 6.1和BlackBerry 10的WebWorks SdK 2.1。
我的问题是当我尝试获取用户位置调用此函数时:
navigator.geolocation.getCurrentPosition(
onSuccessGeo,onErrorGeo,{enableHighAccuracy:true});
我收到此错误:
虽然当我运行基于Webworks SDK 2.1的示例项目,使用cordova,地理定位工作正常。
我对这两个项目使用Worklight和Worklight都做了相同的配置和权限。
我错了什么?
我解决了这个问题通过替换Worklight的Geolocation插件由Webworks SDK 2.1生成的。 p>
因此您必须复制地理位置插件:
ProjectFolder / plugin /org.apache.cordova.geolocation
并过过
/ProjectFolder/webresources/default/worklight/plugins/org.apache.cordova.geolocation
>
------->
这是所有,希望如果你会遇到这样的问题,它会帮助你。
I'm working with Worklight 6.1 and WebWorks SdK 2.1 for BlackBerry 10.
my issue is when I try to get the User location invoking this function :
navigator.geolocation.getCurrentPosition(
onSuccessGeo, onErrorGeo, {enableHighAccuracy: true});
I get this error :
Though when I run a sample project based on Webworks SDK 2.1, with cordova, the geolocation works fine.
I made the same configuration and permissions for the 2 projects, both with Worklight and without Worklight.
Did I miss something?
I resolved this issue by replacing Geolocation plugin of Worklight by the one generated by Webworks SDK 2.1.
So you have to copy the Geolocation Plugin under :
ProjectFolder/plugin/org.apache.cordova.geolocation
and past it under :
/ProjectFolder/webresources/default/worklight/plugins/org.apache.cordova.geolocation
------->
That's all, hope it will help you if you'll face such problem.
这篇关于黑莓10 Webworks与Worklight地理位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!