lib/Ext/device/geolocation/Abstract.js
function(config) {
        var defaultConfig = Ext.device.geolocation.Abstract.prototype.config;

        config = Ext.applyIf(config, {
            maximumAge: defaultConfig.maximumAge,
            frequency: defaultConfig.frequency,
            allowHighAccuracy: defaultConfig.allowHighAccuracy,
            timeout: defaultConfig.timeout
        });

        // <debug>
        if (!config.callback) {
            Ext.Logger.warn('You need to specify a `callback` function for #watchPosition');
        }
        // </debug>

        return config;
    }
function(config) {
        var defaultConfig = Ext.device.geolocation.Abstract.prototype.config;

        config = Ext.applyIf(config, {
            maximumAge: defaultConfig.maximumAge,
            frequency: defaultConfig.frequency,
            allowHighAccuracy: defaultConfig.allowHighAccuracy,
            timeout: defaultConfig.timeout
        });

        // <debug>
        if (!config.callback) {
            Ext.Logger.warn('You need to specify a `callback` function for #watchPosition');
        }
        // </debug>

        return config;
    }
Watches for the current position and calls the callback when successful depending on the specified {@link #frequency}.

Ext.device.Geolocation.watchPosition({
callback: function(position) {
console.log(position);
},
failure: function() {
Ext.Msg.alert('Geolocation', 'Something went wrong!');
}
});

@param {Object} config An object which contains the following config options:

@param {Function} config.callback
The function to be called when the position has been updated.

@param {Function} config.failure
The function that is called when something goes wrong.

@param {Object} config.scope
The scope of the `success` and `failure` functions.

@param {Boolean} config.frequency
The frequency in which to call the supplied callback. Defaults to {@link #frequency} if you do not specify a value.

@param {Boolean} config.allowHighAccuracy
True to enable allow accuracy detection of the location of the current device. If you do not specify a value, it will
default to {@link #allowHighAccuracy}.