2011-06-24 54 views
1

下面的代码在iPhone模拟器上很好地工作,但在Android 2.3上,我只是得到一个带有Google徽标的空白地图(参见附件截图)。无法在Android 2.3上显示地图

var mainWin = Ti.UI.createWindow({backgroundColor:'#fff', fullscreen:true, navBarHidden: true}) 
mainWin.open(); 

var win = mainWin; 

var mapview = Titanium.Map.createView({ 
    mapType: Titanium.Map.STANDARD_TYPE, 
    region:{latitude:33.74511, longitude:-84.38993, latitudeDelta:0.5, longitudeDelta:0.5}, 
    animate:true, 
    regionFit:true, 
    userLocation:true 
}); 

win.add(mapview); 

任何想法是怎么回事?

enter image description here

回答

4

当您使用SDK你得到这个当你missing the maps api key。你可以试试看。

你是否也在使用android模拟器?因为如果你是,你需要验证你的图片是否有谷歌apis。

+0

添加API密钥的窍门。谢谢! –