【发布时间】:2013-09-30 14:05:59
【问题描述】:
我已经在基于 sencha 的应用程序中实现了地图功能。地图正在显示,但无法放大或缩小,也无法向其他方向移动。它在图像中显示为静态。
但我想将地图显示如下
这是我的代码
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:'spacer'
}
]
},
{
xtype:'map',
useCurrentLocation:false,
mapOptions: {
zoom: 15,
zoomControl : true,
center: new google.maps.LatLng(11.0183, 76.9725),
mapTypeId: google.maps.MapTypeId.ROADMAP,
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.DEFAULT
}
}
}
]
})
在我的代码中需要进行哪些更改,添加放大和缩小功能。
【问题讨论】:
-
控制台有错误吗?
-
它看起来像一个布局探针,尝试将地图放在布局为'fit'的容器中
-
谢谢,现在工作正常
标签: google-maps layout extjs sencha-touch sencha-touch-2