Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1793

Cordova geolocation plugin getCurrentPosition deprecated

$
0
0

I have an ionic app that is trying to use geolocation exactly as shown in the docs.

var posOptions = {timeout: 10000, enableHighAccuracy: true};$cordovaGeolocation.getCurrentPosition(posOptions)  .then(function (position) {    //  do something  }, function(err) {    console.log(err);    // error  });

But now it has stopped working and in the console gives me this warning.

getCurrentPosition() and watchPosition() are deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS.

This seems like a huge change to the w3c spec I am just surprised there is not a lot of documentation regarding it. Can anyone tell me what I am missing here.

The app is running on phones so it's listening on localhost naturally. It is talking to the server over http not https but I don't see why that would affect getting geo-coordinates

I am testing the app on the browser and as a cordova app on an ios device.


Viewing all articles
Browse latest Browse all 1793

Trending Articles