Sencha touch 拒绝时Sencha Ext.Map usecurrentlocation

Sencha touch 拒绝时Sencha Ext.Map usecurrentlocation,sencha-touch,sencha-touch-2,Sencha Touch,Sencha Touch 2,我用的是外线地图 { xtype: 'map', height: '100%', useCurrentLocation: true, mapOptions: { zoom: 18 } } 如何知道用户拒绝共享其位置,以便我显示错误?在mapOptions之后向mapObject添加以下内容: mapOptions : { . . . zoom : 18 }, geo:new Ext.util.GeoLocation({

我用的是外线地图

{
    xtype: 'map',
    height: '100%',
    useCurrentLocation: true,
    mapOptions: {
        zoom: 18
    }
}

如何知道用户拒绝共享其位置,以便我显示错误?

在mapOptions之后向mapObject添加以下内容:

mapOptions : { . . . 
  zoom : 18
},

geo:new Ext.util.GeoLocation({

    autoUpdate:true,
    maximumAge: 0,
    timeout:2000,
    listeners:{
        locationupdate: function(geo) {
            center = new google.maps.LatLng(geo.latitude, geo.longitude);
            if (map.rendered)
                map.update(center)
            else
                map.on('activate', map.onUpdate, map, {single: true, data: center});
        },
        locationerror: function (geo,bTimeout, bPermissionDenied, bLocationUnavailable, message) {
            if(bLocationUnavailable){
                alert('Your Current Location is Unavailable on this device');
            }
            else if (bPermissionDenied){
                alert('Location capabilities have been disabled on this device.');
            }      
        }
    }
});