Sencha touch 2 更改sencha touch 2地图中的默认缩放级别

Sencha touch 2 更改sencha touch 2地图中的默认缩放级别,sencha-touch-2,Sencha Touch 2,如何更改sencha touch 2中的默认缩放级别? 目前我正在使用这样的代码 var gmaps={ xtype : 'panel', height : Math.ceil(Ext.Element.getDocumentHeight()*.25), width : Math.ceil(Ext.Element.getDocumentWidth()*.96),

如何更改sencha touch 2中的默认缩放级别? 目前我正在使用这样的代码

  var gmaps={
                xtype    : 'panel',
                height    : Math.ceil(Ext.Element.getDocumentHeight()*.25),
                width    : Math.ceil(Ext.Element.getDocumentWidth()*.96),
                layout:'card',
                items:[{
                    xtype: 'map',
                    useCurrentLocation: true,geo: geo, //Ext.util.Geolocation object
                    useCurrentLocation: geo, //same var geo with geolocation object
                    config: {
                        mapOptions:{
                            zoom: 25,
                            disableDefaultUI: true,
                        //--Available Map Options--//

                            panControl: false,
                            zoomControl: false,
                            mapTypeControl: false,
                            scaleControl: false,
                            streetViewControl: false,
                            overviewMapControl: false 
                        },

但即使我更改了“缩放”的值,它也不会更改,这是因为您将
mapOptions
对象放在
config
对象中

只需删除config对象,您就可以完成所有设置:

xtype: 'map',
useCurrentLocation: true,geo: geo, //Ext.util.Geolocation object
useCurrentLocation: geo, //same var geo with geolocation object
mapOptions:{
    zoom: 25,
    disableDefaultUI: true,
//--Available Map Options--//

    panControl: false,
    zoomControl: false,
    mapTypeControl: false,
    scaleControl: false,
    streetViewControl: false,
    overviewMapControl: false 
},
希望这有帮助