ghost rider3
ghost rider3

Reputation: 458

Blackberry 10 Webworks with Worklight 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 :

TypeError: 'undefined' is not an object (evaluating 'e.code') geolocation.js:115

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?

Upvotes: 0

Views: 170

Answers (1)

ghost rider3
ghost rider3

Reputation: 458

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

enter image description here

------->

enter image description here

That's all, hope it will help you if you'll face such problem.

Upvotes: 1

Related Questions