在 BlackBerry OS 5+ 上从浏览器打开 BBMaps
我完全无法使用其文档指示的方法从 BBOS5 设备的 BlackBerry 浏览器打开 BBMap。这个功能真的被破坏了吗?文档真的有那么错误吗?或者我做错了什么?
BBOS 4.5 中添加了对执行此操作的支持,据称该支持在版本 6 中已存在。有 黑莓论坛上关于它的旧帖子;该线程中的示例网站之一无法在 Storm 2 上运行,而另一个应用程序已关闭。
根据文档,BBOS 5 据称支持 KML 和专有的 BlackBerry 位置标记语言XLOC。
我认为至少 XLOC 可以工作,因为 版本 6据称保留了对 XLOC 的支持并放弃了 KML 支持。但不。
我在 Storm 2 模拟器中运行 5.0.0.713,在物理 Storm 2 上运行 5.0.0.1015。
我认为文档是错误的。我无能为力 - KML、KMZ、XLOC、动态生成、具有正确 MIME 类型的静态文件等等。这真的不应该这么难!
这里有一些值得思考的事情:如果您在浏览器中访问maps.blackberry.com 上的地图...为什么没有在Blackberry 地图中打开它的选项?
由于这是一个专业的网络项目,我无法公开共享环境。不过,我也许可以在我的个人服务器上复制相关部分。这真的很令人沮丧,因为我们真的很想支持黑莓用户,但我们开始认为这是不可能的。
如果有人可以提供一个执行此操作的工作示例(特别是针对 BlackBerry Storm 2),我将非常感激。如果有人能证实这是不可能的,那也是有价值的。
I have been totally unable to open BBMaps from the BlackBerry browser from BBOS5 devices using the approach their documentation indicates. Is this functionality really broken - is the documentation really that wrong? Or am I doing something wrong?
Support for doing just this was added in BBOS 4.5 and allegedly exists through version 6. There's an old thread about it on the BlackBerry forums; one of the sample websites in that thread does not work on the Storm 2, while the other application is down.
I figured at least XLOC would work, since version 6 allegedly retained support for XLOC and dropped KML support. But nope.
I'm running 5.0.0.713 in the Storm 2 simulator and 5.0.0.1015 on a physical Storm 2.
I'm thinking the documentation is just wrong. Nothing I can do works - KML, KMZ, XLOC, dynamic generation, static files with proper MIME types, etc., etc., etc. This really shouldn't be this hard!
Here's something to ponder: if you go to a map on maps.blackberry.com in the browser... why is there no option to open it in Blackberry Maps?
As this is a professional web project, I can't publicly share the environment. I may be able to duplicate the relevant parts on my personal server, though. It's really frustrating, as we'd really like to support BlackBerry users, but we're starting to think it's not possible.
If anybody can produce a working example of doing this (for the BlackBerry Storm 2 specifically), I would be extremely grateful. If anybody can confirm that it's not possible, that would be worth something as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所以!答案在于忽略所有这些并使用 BlackBerry Javascript API。只需根据规范将地址创建为 json 对象,并像这样调用 blackberry.launch.newMap :
我知道必须有一个合理的方法来做到这一点!我有点担心这似乎很少被使用,但它可以在 Storm 2 上运行,并且据称可以在更新的平台上运行,所以我现在很满意。
根据规范,您还可以传递纬度/经度和 XLOC 标记。我还没有测试过。似乎没有任何对 KML 的支持,这有点遗憾。
(当然,对于多平台 Web 开发,您需要添加对黑莓对象等的检查。)
So! The answer lies in disregarding all of that and using the BlackBerry Javascript API. Just create the address as a json object according to the spec, and call blackberry.launch.newMap like so:
I knew there had to be a reasonable way to do it! I'm a little concerned that this seems to be little-used, but it works on the Storm 2 and allegedly works on more recent platforms, so I'm satisfied for now.
According to the spec, you can also pass lat/long and XLOC markup. I have not tested that. There doesn't seem to be any support for KML, which is a bit of a shame.
(Of course, for multiplatform web development, you'll need to add checks for the blackberry object etc.)