View Full Version : Getting more than one property from geolocation class ?

24 Aug 2011, 3:36 AM

I started using sencha yesterday and using the geolocation class example I can only get one return eg geo. latitude anything else is undefined, I want to pull and display all information on one page.

I have gone with Google and looked through forums and the closest I got was a year old post by arlo.carreon regarding adding a Google map layer (see quote at the end), with that I can get latitude and longitude but not altitude, speed etc...

I am using a iPhone 4 for testing (ios 4.3.3)

Thanks in advance

The google api was giving an error with "getLocation:true". Try to use sencha geo location.

Implement these functions:

var userLocation = {};
function getLocation()
// Get lat/long for your location
var LocInfo = new Ext.util.GeoLocation();
// END - Getting your location
function updateUserLocation(data)
// Callback for getting user location
userLocation.latitude = data.latitude;
userLocation.longitude = data.longitude;

EDIT: I see the error in my ways, I was trying to call two lookups where after one it would re-run.