0

I am trying to run the maps example Qml however my MapView keeps loading as a just black. I checked the console output and spotted this.

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 

So it looks like it is not loading a proper render engine for my map. I tried updating my SDK and updated the OS on the phone using the blackberry OS update to no avail.

Here is the full Qml for my map:

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
        }
    }
}

More details: OS Version: 10.9.10.35 Native SDK: 10.0.9.1673 Momentics Version: 10.0.9

I tried another SDK version too, 10.0.10.xxx and it didn't work either.

Tjaart
  • 3,912
  • 2
  • 37
  • 61
  • Try to check all permission in your descriptor. Have you added all Libs in the .PRI ( -lbbcascadesmaps -lQtLocationSubset )? – Benoit Mar 11 '13 at 16:37
  • Thanks! That worked, but the gl line needed to be included too. Don't know how I missed that. Anyway could you express it as an answer so I can accept it please @Hithredin ? – Tjaart Mar 12 '13 at 08:33

2 Answers2

3

As @Hithredin mentioned above in a comment, in order to have maps functionality you need to make sure that you specified all the libraries to link for linker in your .pro file:

LIBS += -lbbplatform -lbbcascadesmaps -lGLESv1_CM

and also if you're using geolocation (which happens pretty often when you use maps) you need to have the following set of permissions in your bar-descriptor.xml file:

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

More about maps and location on Blackberry dev site:

Sunseeker
  • 1,503
  • 9
  • 21
0

make sure to include

#include <bb/cascades/maps/MapView>

in your ApplicationUI.hpp or ApplicationUI.cpp.