BlackBerry Cascades 10 Maps示例一直显示黑屏

时间:2013-03-11 14:02:25

标签: blackberry-10 blackberry-cascades

我正在尝试运行地图示例Qml但是我的MapView继续加载为黑色。我检查了控制台输出并发现了这一点。

slogger2 buffer handle not initialized. ../../lgmon_api.c, logEvent(), around line 578!
cpp:: Created document 
cpp:: properties set 
MapViewPrivate::removeRenderEngine 
using the following render engine:  bb::cascades::maps::BlankRenderEngine 
MapViewPrivate::removeRenderEngine 
removing the old render engine:  bb::cascades::maps::BlankRenderEngine 
RenderEngineManager::RenderEngineManager 
RenderEngineManager::scanForPlugins() 
render engine search: searching   QDir( "/apps/com.example.GConnectBB.testDev__GConnectBB7836cab4/native/mapview-renderengine" , nameFilters = { * },  QDir::SortFlags( Name | IgnoreCase ) , QDir::Filters( Dirs|Files|Drives|AllEntries ) )  
render engine search: searching   QDir( "/base/usr/lib/qt4/plugins/mapview-renderengine" , nameFilters = { * },  QDir::SortFlags( Name | IgnoreCase ) , QDir::Filters( Dirs|Files|Drives|AllEntries ) )  
render engine search: attempting to load  "/base/usr/lib/qt4/plugins/mapview-renderengine/libRenderEngine3d.so" 
unknown symbol: _ZTIN2bb8platform3geo11GeoLocationE
unknown symbol: _ZTIN2bb8platform3geo11GeoLocationE
unknown symbol: _ZNK2bb8platform3geo11GeoLocation10metaObjectEv
unknown symbol: _ZN2bb8platform3geo11GeoLocation11qt_metacastEPKc
unknown symbol: _ZN2bb8platform3geo11GeoLocation11qt_metacallEN11QMetaObject4CallEiPPv
unknown symbol: _ZNK2bb8platform3geo11GeoLocation11boundingBoxEv
unknown symbol: _ZTIN2bb8cascades4maps17BlankRenderEngineE
unknown symbol: _ZN2bb8cascades4maps17BlankRenderEngine16staticMetaObjectE
unknown symbol: _ZTIN2bb8platform3geo10GeographicE
RenderEngineManager::engine(  <ViewProperties altitude=0, heading=0, lat=43.4682, lon=-80.5196, tilt=0, window=QSize(0, 0) >  ) 
using the following render engine:  bb::cascades::maps::BlankRenderEngine 

所以看起来它没有为我的地图加载适当的渲染引擎。我尝试更新我的SDK并使用黑莓操作系统更新在手机上更新操作系统无济于事。

以下是我的地图的完整Qml:

import bb.cascades 1.0
import bb.cascades.maps 1.0

Page {
    Container {
        layout: StackLayout {
        }
        MapView {
            id: mapview
            latitude: 43.468245
            longitude: -80.519603
            altitude: 10000
        }
    }
}

更多细节: 操作系统版本:10.9.10.35 原生SDK:10.0.9.1673 Momentics版本:10.0.9

我也尝试了另一个SDK版本,10.0.10.xxx,它也没有用。

2 个答案:

答案 0 :(得分:3)

正如@Hithredin在评论中提到的那样,为了拥有地图功能,您需要确保在.pro文件中指定链接链接的所有库:

LIBS += -lbbplatform -lbbcascadesmaps -lGLESv1_CM

如果您正在使用地理位置(在使用地图时经常发生这种情况),您需要在bar-descriptor.xml文件中拥有以下一组权限:

<permission>read_geolocation</permission>
<permission>access_location_services</permission>

有关Blackberry开发网站上的地图和位置的更多信息:

答案 1 :(得分:0)

确保包含

#include <bb/cascades/maps/MapView>
在ApplicationUI.hpp或ApplicationUI.cpp中