如果我理解正确,您的问题是“如何将 google MAPS API 与 Sencha 应用程序一起使用”。目前您的应用程序无法识别 google apps API。
我在应用程序文件中进行了以下更改。
index.html
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
app.js
// 设置命名空间如下,并在touch/src/lib/plugin下添加google库
Ext.Loader.setPath({
'Ext' : 'touch/src',
'WU' : 'app',
'Ext.plugin': 'lib/plugin'
});
// 在 requires 配置中添加所需的类
要求:['Ext.MessageBox','Ext.plugin.google.Traffic','Ext.plugin.google.Tracker'],
启动:函数(){
//Tracking Marker Image
var image = new google.maps.MarkerImage(
'resources/images/point.png',
new google.maps.Size(32, 31),
new google.maps.Point(0, 0),
new google.maps.Point(16, 31)
);
var shadow = new google.maps.MarkerImage(
'resources/images/shadow.png',
new google.maps.Size(64, 52),
new google.maps.Point(0, 0),
new google.maps.Point(-5, 42)
);
希望对你有帮助。