PDA

View Full Version : Ext.device.Geolocation



gkatz
6 Jan 2013, 12:48 AM
Hi;
the docs are a bit confusing for me with regard to this class:
from the docs:


Provides access to the native Geolocation API when running on a device. There are three implementations of this API:

Sencha Packager
PhoneGap (http://docs.phonegap.com/en/1.4.1/phonegap_device_device.md.html)
Browser
This class will automatically select the correct implementation depending on the device your application is running on.

does this mean I should always choose Ext.device.Geolocation over Ext.util.GeoLocation and let sencha choose?

mitchellsimoens
8 Jan 2013, 7:04 AM
Ext.device.Geolocation will choose to use Ext.util.GeoLocation if the app is in a browser. You could use Ext.device.Geolocation and it will figure it out but if your app is going to be only in the browser then it's a waste of space to include Ext.device.Geolocation when you know you need to use Ext.util.GeoLocation.

gkatz
8 Jan 2013, 9:17 AM
my app will as a native app only.
so shold Iuse Ext.device?

mitchellsimoens
8 Jan 2013, 9:56 AM
Yes. Ext.device classes are meant to be used in native apps so the Geolocation normalizes things between the different native packagers we support (ours and phonegap)