在我的sencha应用程序中,我导入了代码show marker / pin,但它没有在postion中显示任何标记,在这里我的代码,
编辑更新的代码
var mapapnel = Ext.create('Ext.Panel', {
id: 'mapapnel',
layout:'card',
height: '100%',
width: '100%',
items: [
{ xtype: 'toolbar',
ui:'light',
docked: 'top',
title: 'Find location',
items: [{
text: 'Back',
ui: 'back',
handler: function() {
Ext.getCmp('homepnl').setActiveItem(1);
}
}]
},{
xtype:'map',
useCurrentLocation:false,
mapOptions: {
zoom: 12,
zoomControl : true,
center: new google.maps.LatLng(11.0183, 76.9725),
mapTypeId: google.maps.MapTypeId.ROADMAP,
navigationControl: true,
navigationControlOptions:
{
style: google.maps.NavigationControlStyle.DEFAULT
}},
listeners: {
maprender: function(comp, map) {
var position = new google.maps.LatLng(11.01684, 76.95583);
var marker = new google.maps.Marker({
position: position,
title : 'Sencha HQ',
map: map
});
google.maps.event.addListener(marker, 'click', function() {
});
setTimeout(function() {
map.panTo(position);
}, 1000);
}
},
}]
});
是什么让我的代码中的标记不可见?请帮我解决