javascript - 无法在 Android 2.3 上显示 map

标签 javascript android titanium appcelerator

以下代码在 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);

知道发生了什么吗?

enter image description here

最佳答案

当您使用 SDK 时,您会在 missing the maps api key 时得到这个.您可以尝试调查一下。

你也在用安卓模拟器吗?因为如果是,则需要验证您的图片是否具有 google api。

关于javascript - 无法在 Android 2.3 上显示 map ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6473465/

相关文章:

javascript - 纯 Javascript 将文本插入 <input type ="text"> 而不带属性

android - 根据产品 flavor 为 Intent 使用不同的类

android - 无法创建 Android SQLite 数据库 : PRAGMA error

android - 我可以在 Appcelerator Titanium 中使用 native 库吗?

Javascript计算给定日期是当前日期还是 future 日期?

JavaScript addClass 不适用于 PHP GET ['page']

android - Titanium Mobile Android 连续更改顺序

java - 如何从 native 模块触发事件

javascript - 如何召回或重启 MathJax?

android - 如何以编程方式在android sqlite中找出表的主键?