abigdreamer
Posts: 0
Joined: Fri Jul 12, 2013 7:20 pm

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

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

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

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

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'.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

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

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

abigdreamer
Posts: 0
Joined: Fri Jul 12, 2013 7:20 pm

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

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.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

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

Hello Mike,

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

Return to “Issues”