以下代码在 iPhone 模拟器上运行良好,但在 Android 2.3 上,我只能得到一张带有 Google Logo 的空白 map (见随附的屏幕截图)。
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);
知道发生了什么吗?
最佳答案
当您使用 SDK 时,您会在 missing the maps api key 时得到这个.您可以尝试调查一下。
你也在用安卓模拟器吗?因为如果是,则需要验证您的图片是否具有 google api。
关于javascript - 无法在 Android 2.3 上显示 map ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6473465/