У меня вопрос по xtypes.Когда я делаю это:
// map
var map = new Ext.map({
fullscreen: true,
getLocation: true,
mapOptions: {
zoom: 12
}
});
map.map.setCenter(new google.maps.LatLng(record.attributes.record.data.latitude, record.attributes.record.data.longitude));
Все хорошо, карта отображается.
Теперь, когда я работаю с xtypes, переменная 'map' не распознает 'setCenter'-недвижимость.Код: var map = {fullscreen: true, xtype: 'map', title: 'Map', getLocation: true, useCurrentLocation: true, mapOptions: {zoom: 12}};
map.map.setCenter(new google.maps.LatLng(record.attributes.record.data.latitude, record.attributes.record.data.longitude));
С этимкод, я получаю это в консоли:
Uncaught TypeError: Невозможно вызвать метод 'setCenter' из неопределенного
Я надеюсь, что кто-то может мне помочь.Заранее спасибо!