Page 2 of 2

Why does Lat and Long not working in my app. Keeps returning 37.97194-122.042688 on more than one device?

Posted: Tue Sep 01, 2015 12:20 am
by abigdreamer

OK -- I'm cleaning it up and deleting a TON of things -- trying again.


Why does Lat and Long not working in my app. Keeps returning 37.97194-122.042688 on more than one device?

Posted: Tue Sep 01, 2015 12:26 am
by maxkatz

The Geolocation service is a wrapper on top of Cordova Geolocation service. The actual location is returned by your device. If you are testing from a desktop browser, your location might be determined by your IP address (which might be not the location you are physically at).

Two things you can try:
1) Create a brand new app, add the Geolocation service there and display the result
2) Use the Cordova API directly:
pre
var onSuccess = function(position) {

Code: Select all

Apperyio("lat").text(position.coords.latitude); 
Apperyio("lng").text(position.coords.longitude); 

};

function onError(error) {
alert('code: ' + error.code + '\n' +
'message: ' + error.message + '\n');
}

navigator.geolocation.getCurrentPosition(onSuccess, onError);
/pre

this assumes you have two labels named 'lat' and 'lng'.


Why does Lat and Long not working in my app. Keeps returning 37.97194-122.042688 on more than one device?

Posted: Tue Sep 01, 2015 12:27 am
by abigdreamer

This is not from a browser. Uploading a video.


Why does Lat and Long not working in my app. Keeps returning 37.97194-122.042688 on more than one device?

Posted: Tue Sep 01, 2015 12:37 am
by abigdreamer

https://youtu.be/eIjyttIMN-k

Here is an UNLISTED Video Link


Why does Lat and Long not working in my app. Keeps returning 37.97194-122.042688 on more than one device?

Posted: Tue Sep 01, 2015 4:06 am
by maxkatz

Please try the two options I mentioned above to try and figure out this problem.


Why does Lat and Long not working in my app. Keeps returning 37.97194-122.042688 on more than one device?

Posted: Tue Sep 01, 2015 5:56 am
by abigdreamer

GPS works fine when I'm not using services and mapping.
But it doesn't answer the question what is wrong.

I also don't know how to update my storage variables and fields on the screen so that the service can get the data.


Why does Lat and Long not working in my app. Keeps returning 37.97194-122.042688 on more than one device?

Posted: Wed Sep 16, 2015 11:25 am
by Alena Prykhodko

Hello Mike,

Do you need further assistance here?
If so, please show us what you have tried and what does not work.