【发布时间】:2012-04-18 01:37:16
【问题描述】:
我有一个 sencha touch 1 应用程序,我刚刚升级到 sencha touch 2,除了谷歌地图之外,我什么都可以使用。
在 ST1 中,我在 index.html 中添加了这一行:
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
然后我将其添加到面板中:
{
xtype: 'map',
useCurrentLocation: false,
fullscreen: false,
layout: 'auto',
id: 'jobmap',
height: 400,
mapOptions: {
zoom: 12,
navigationControl: true,
navigationControlOptions:
{
style: google.maps.NavigationControlStyle.DEFAULT
}
}
}
在 ST2 中,文档说仍然添加对 index.html 的引用,尽管他们的论坛似乎也说使用 app.json。我已经尝试使用上面的代码并且面板上没有任何内容。它之前和之后的控件彼此相邻。
我什至刚刚尝试过:
{
xtype: 'map',
useCurrentLocation: true
}
我仍然一无所获。
有什么想法吗?
【问题讨论】:
-
帮我看看我关于地图的帖子,我需要帮助,谢谢:stackoverflow.com/questions/10748533/…
标签: google-maps sencha-touch sencha-touch-2