黑莓叶栅mapview [英] blackberry cascades mapview

查看:104
本文介绍了黑莓叶栅mapview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试基于此链接,但是每当我导入地图

Hi I am trying to implement a mapview using blackberry cascades based on this link but whenever I import maps

import bb.cascades.maps 1.0

QNX IDE抛出错误

the QNX IDE throws out an error saying

bb.cascades.maps is not installed.

我已经完全按照开发人员站点中的说明设置了环境,并且似乎不了解如何安装此模块.

I have set up the environment exactly as described in the developer site and dont seem to understand how do i install this module.

推荐答案

他们似乎省略了一些步骤.默认情况下,并非所有级联对象都已加载到开发系统中,但是可以在运行时添加它们.最大的缺点是Eclipse无法仅对常规语法中的错误进行QML的静态分析.

They seem to have left out some steps. Not all cascades objects are loaded by default into the development system, but they can be added at runtime. The biggest drawback is that the Eclipse can't do static analysis of the QML for errors only general syntax.

如果将以下几行添加到main.cpp文件中,则可能会使示例工作(我将其砍入了我的当前项目之一,并使其无错误加载,但MapView均为黑色):

If you add the following lines to the main.cpp file you may get the example to work (I hacked this into one of my current projects and got it to load without errors but the MapView is all black):

#include #include <bb/cascades/maps/MapView>

然后在QmlDocument :: create调用之前:

Then just before the QmlDocument::create call:

qmlRegisterType<bb::cascades::maps::MapView>("bb.cascades.maps", 1, 0, "MapView");

这是一种机制,经常用于使默认设置中未包括的Cascades对象可用,或者使CustomControl或QML可用的其他Cascades对象成为您自己的专业化对象.

This is the mechanisim that is used quite frequently to make Cascades objects not included in the default setup available, or to make your own specializations from CustomControl or other Cascades objects available to QML.

最后,这个示例似乎早于beta 3,因此您可能还需要解决一些其他问题.

Finally this example seems to pre-date beta 3 so there may be some other issues that you may have to work through.

编辑

我四处摸索,发现了这个

I did some poking around and found this thread on the BlackBerry forum. Setting the altitude to 10000 actuall got me a usable map on the simulator and the Dev Alpha. It obviously needs more work but you can interact with it (drag to move, pinch to zoom, etc).

这篇关于黑莓叶栅mapview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆