Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
Posts: 41
Registered: ‎02-11-2010
My Device: Bold 9000
My Carrier: AT&T
Accepted Solution

MapView Issues after 2.0 Momentics Update

Hello, I'm working on a prototype for an app idea I have and need to make a MapView very much in the way FourSquare handles map views for venues. I was lead to believe that native maps integration required very little coding and nothing more than a few lines of code. I have been studying the mapview demo up and down for hours and I can't figure out what I did wrong. Here is the code base.

 

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

Page {
    Container {
        //Todo: fill me with QML
        Label {
            // Localized text with the dynamic translation and locale updates support
            text: qsTr("Hello World") + Retranslate.onLocaleOrLanguageChanged
            textStyle.base: SystemDefaults.TextStyles.BigText
        }
        MapView {
            id: mapview
            objectName: "mapView"
            altitude: 3000
            latitude: 43.449488
            longitude: -80.406777
            horizontalAlignment: HorizontalAlignment.Center
            preferredHeight: Infinity
            preferredWidth: Infinity
            
        }
    }
}

 The problem is on the cascades viewer the mapview displays in RED saying "Missing: MapView" when deployed on a device (Dev Alpha B) I get a black box, and no map, pinching and panning seem to output something to the console log, but is also not very helpful.

 

Qml debugging is enabled. Only use this in a safe environment!
unknown symbol: _ZN2bb8cascades4maps7MapView7setTiltEi
unknown symbol: _ZN2bb8cascades4maps7MapView11setAltitudeEd
unknown symbol: _ZN2bb8cascades4maps7MapView11setLatitudeEd
unknown symbol: _ZN2bb8cascades4maps7MapViewC1EPNS0_9ContainerE
unknown symbol: _ZN2bb8cascades4maps7MapView12setLongitudeEd
unknown symbol: _ZN2bb8cascades4maps7MapView15setRenderEngineEPNS1_12RenderEngineE
OrientationSupportPrivate::getSupportedDisplayOrientation:  auto 
OrientationSupportPrivate::initDirectionAndOrientation: 
   isCardOrViewer:  false 
   manifestDisplayOrientation: All 
   displayOrientation: All 
   uiOrientation: Portrait 
   displayDirection: North 
   nativeDisplayOrientation: Portrait 
CS Debugging enabled: false 
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.WoHoMu.testDev_mple_WoHoMued1f8138/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" 
RenderEngineManager::engine(  <ViewProperties altitude=3000, heading=0, lat=43.4495, lon=-80.4068, tilt=0, window=QSize(768, 1165) >  ) 
using the following render engine:  bb::cascades::maps::BlankRenderEngine 
unknown symbol: _ZTIN2bb8platform3geo11GeoLocationE
unknown symbol: _ZTIN2bb8platform3geo11GeoLocationE
unknown symbol: _ZNK2bb8platform3geo11GeoLocation10metaObjectEv
unknown symbol: _ZN2bb8platform3geo11GeoLocation11qt_metacastEPKc
unknown symbol: _ZN2bb8platform3geo11GeoLocation11qt_metacallEN11QMetaObject4CallEiPPv
unknown symbol: _ZNK2bb8platform3geo11GeoLocation11boundingBoxEv
unknown symbol: _ZTIN2bb8cascades4maps12RenderEngineE
unknown symbol: _ZN2bb8cascades4maps12RenderEngine16staticMetaObjectE
unknown symbol: _ZTIN2bb8platform3geo11GeoPolylineE
unknown symbol: _ZTIN2bb8platform3geo10GeoPolygonE
unknown symbol: _ZTIN2bb8platform3geo10GeographicE
unknown symbol: _ZN2bb8platform3geo17GeoDeviceLocation16staticMetaObjectE
unknown symbol: _ZNK2bb8platform3geo8Polyline5countEv
unknown symbol: _ZNK2bb8cascades4maps25RenderEngineConfiguration21foreignWindowWindowIdEv
unknown symbol: _ZN2bb8platform3geo5StyleD1Ev

 I've added the necessary permissions for location and internet in the bar-descriptor as well as added the
LIBS += -lbbcascadesmaps line to the .pro file for the project. Can anyone help me know what is going on?

 

 

Developer
Posts: 419
Registered: ‎04-10-2011
My Device: Z10 LE & PlayBook

Re: MapView Issues after 2.0 Momentics Update

bb::cascades::maps::BlankRenderEngine is used, when no other render engine can be found.

Try adding LIBS += -lGLESv1_CM to your .pro file. I think that I remember that this includes the correct library that also has a render engine for the maps.
-----------------------------------------------------------------------------
Check out my apps in the BlackBerry World
Visit my developer blogs /dev/alopix and /home/alopix
BBM Channel: C0047B612
Developer
Posts: 1,645
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: MapView Issues after 2.0 Momentics Update

I'm using these libs:

 

-lQtLocationSubset -lbbcascadesmaps -lGLESv1_CM

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner
New Developer
Posts: 41
Registered: ‎02-11-2010
My Device: Bold 9000
My Carrier: AT&T

Re: MapView Issues after 2.0 Momentics Update

thanks guys! that did it. All the documentation I read only mentioned only the  LIBS += -lbbcascadesmaps and not the other two. I'm still learning, so I hope this helps someone else

Developer
Posts: 73
Registered: ‎04-08-2014
My Device: Z10
My Carrier: XL

Re: MapView Issues after 2.0 Momentics Update

hi, im still black screen

i already did what ekke said..

is there anything wrong with my momentics 2.0?

 

when i run mapView samples it worked

but when in my apps its all black

what happen?

New Developer
Posts: 28
Registered: ‎04-15-2013
My Device: Z10
My Carrier: T-Mobile

Re: MapView Issues after 2.0 Momentics Update

[ Edited ]

It seems that in the recent SDK something is screwed up with the debug symbols for MapView which prevents it from showing up.  Switch to "Run release" mode and rebuild your application and then you'll see the map working fine....