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
Developer
Posts: 116
Registered: ‎10-31-2012
My Device: BB10 Dev Alpha B
My Carrier: -

MapView on Beta 4

MapView performance on Beta 4 still seems a little rough.

 

I was trying the MapView example on the Dev Alpha (having fixed the altitude bug, see http://supportforums.blackberry.com/t5/Cascades-Development/MapView-on-DevAlpha-device-10-09-release... ) and its rendering is a bit off.

 

Actually quite a bit off, it was rendering half the image at one resolution and half at another. This is on the  new 10.0.9.1103 firmware.

 

Is there some other update I need to do, or is MapView really still this buggy?

 

Btw MapView and Peek don't work well together, when you try and pan west on MapView, the Peek gesture jumps in and drags the card instead.... Perhaps Peek could be made context sensitive so that it is autro-disabled within the MapView, but working on the rest of the page?

 

 

Developer
Posts: 116
Registered: ‎10-31-2012
My Device: BB10 Dev Alpha B
My Carrier: -

Re: MapView on Beta 4

[ Edited ]

Following on, I've found that I can't set the latitude and longitude of a MapView statically within QML (or using the C++ route).  I have to wait for the onCreationCompleted event, and then set them. So this works:

 

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

Page {
    Container {
        
        layout: DockLayout {}
  
         MapView {
            id: myMap
            horizontalAlignment: HorizontalAlignment.Fill
            
            onCreationCompleted: {
                myMap.setRenderEngine("RenderEngine3D")
                myMap.longitude = -79.4042;
                myMap.latitude = 43.6481;
                myMap.altitude = 1800.0;
                
            }
        }  
    }
  }

 

But this does not: (it crashes the app)

 

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

Page {
    Container {
        
        layout: DockLayout {}
        
        MapView {
            id: myMap
            longitude: -79.4042
            latitude: 43.6481
            altitude: 1800.0
            
            horizontalAlignment: HorizontalAlignment.Fill
            
            onCreationCompleted: {
                myMap.setRenderEngine("RenderEngine3D")
            }
} } }

 

Why? Is the something about my syntax in the second example that's wrong?

 

 

Developer
Posts: 116
Registered: ‎10-31-2012
My Device: BB10 Dev Alpha B
My Carrier: -

Re: MapView on Beta 4

I've also noticed that MapView is built with debug turned on...

 

Every time it renders, I get a swathe of fprintf's in my console window. Is it a mistike, or is MapView considered so "alpha" that RIM needs that output for bug reports from developers?

 

Developer
Posts: 116
Registered: ‎10-31-2012
My Device: BB10 Dev Alpha B
My Carrier: -

Re: MapView on Beta 4

And the problems go on....

 

It looks like MapView's rendering is not compatible with library GLESv2.

 

I've had to revert to GLESv1_CM as GLESv2 was making MapView bail with a "call to pure virtual function" debug message.

 

I was using GLESv2 to support the bbutil.c graphics/font handling code from the NDK (not Cascades)  examples. And I was doing that because Cascades won't give me the length of a string in pixels (I need to do some intelligent word-wrapping).

 

This is my first full-scale Cascades app, and I'm having great difficulty feeling positive about the experience tonight.