cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nicolas Sagon (JIRA)" <>
Subject [jira] [Created] (CB-7283) Wp8 cordova geolocation problem
Date Mon, 11 Aug 2014 09:38:12 GMT
nicolas Sagon created CB-7283:

             Summary: Wp8 cordova geolocation problem
                 Key: CB-7283
             Project: Apache Cordova
          Issue Type: Bug
          Components: WP8
    Affects Versions: 3.5.0
         Environment: Wp 8.1 / windows x64 8.1
            Reporter: nicolas Sagon
            Assignee: Jesse MacFadyen

I have a workfull application on android an iphone build with phonegap 3.5

In this application i use a watchPosition and it's work on android and iPhone. But now i want
to use my application on a WP8.1 device.

So i have add the platform to my project and build it (works fine) but the watchPosition always
return an empty position :

function startGeolocation() {
if (navigator.geolocation) {
    stopGeolocation();      // au cas ou deja lance
    mbdGlobal.geolocationWatchIdHighAccuracy = navigator.geolocation.watchPosition(
        function (position) {
            alert("Position : " + JSON.stringify(position));
            mbdGlobal.lastMyPosition = position;
        // next function is the error callback
        function (error) { displayGeolocationErrorMessage(error, 'GPS') },
            enableHighAccuracy: true
else // finish the error checking if the client is not compliant with the spec
    alertWebapp(strMessageNotCompatible + "(geolocation)");

My alert display : Position : {};

I don't understand why in WP8 this doesn't work. I have add the ID_CAP_LOCATION on my app.

Plz if you know why it's doesn't work tell me.

Thanks you for all your answers.

edit : I also made a test app with the geoloc plugin and it's the same issue doesn't work.

This message was sent by Atlassian JIRA

View raw message