2
我用sencha-cmd創建了一個新的sencha應用程序。我對此有點新。所以,我試圖創建一個地圖:Sencha觸摸地圖中心
{
title: 'Map',
iconCls: 'locate',
layout: 'card',
useCurrentLocation: false,
fullscreen: false,
id: 'locationmap',
mapOptions: {
zoom: 12,
center : new google.maps.LatLng(37.381592, -122.135672),
navigationControl: true,
navigationControlOptions:
{
style: google.maps.NavigationControlStyle.DEFAULT
}
},
items: [
{
docked: 'top',
xtype: 'titlebar',
title: 'Getting Started'
},
{
xtype: 'map'
}
]
}
我已經包含了必要的谷歌地圖API的文件外,還要求Ext.Map
但是地圖上沒有37.381592中心,-122.135672,其集中在其他地方。我怎樣才能解決這個問題?
此外,如何訪問地圖對象?所以,我可以叫東西一樣.getCenter()
編輯:是的,它應該 –