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
Contributor
MrRobClarke
Posts: 12
Registered: ‎05-21-2012
My Device: Torch 9810

Mapview does not render, generates many errors.

Hi,

 

I'm creating an app which has a mapview in it.

With that in mind, I've copied in example code from the custommapview sample on GitHub.

 

After a little head scratching I found that I needed to update my the LIBS setting in my .PRO file, so the app would build.

 

I now have an app which has a map on a TAB which I can switch too when i need to look things up on the map.

 

The problem is that 90% of the time I activate the tab which has the map on, it doesn't work.

I get a black area shown for less than half a second and then I get an off-white area displayed in its place.

 

In the 10% of times, the off-white area gets filled in with map tiles. When it errors, I get this...

 

NBRE_GLTexture::Create2DTexture: glGenTextures failed! texture name=InternalTexture, nbmID=T_BR7_2_PNG_23_63_39, offset=0, memory addr=9786d48 glError = 0
eglSwapBuffers: an EGLSurface argument does not name a valid surface configured for rendering

 

... x100 or more. 

 

Has anyone else seen this and is there a solution available?

 

Developer
ekke
Posts: 1,595
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Mapview does not render, generates many errors.

take a look at this thread

I gave samoe tips

http://supportforums.blackberry.com/t5/Cascades-Development/Custom-MapView-is-working/td-p/2110513

 

 

-------------------------------------------------------------------------------
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
Contributor
MrRobClarke
Posts: 12
Registered: ‎05-21-2012
My Device: Torch 9810

Re: Mapview does not render, generates many errors.

Thanks!

I'll take a look at those tips.

Contributor
MrRobClarke
Posts: 12
Registered: ‎05-21-2012
My Device: Torch 9810

Re: Mapview does not render, generates many errors.

I think I've got a solution to my problem.

I've observed that the mapview doesn't like being re-rendered in quick succession.

 

This can happen if you have the mapview misplaced in your container heirarchy and it gets resized for some reason.

 

Especially if you add a TextField control to the same page, to do some geocoding for example.

The act of displaying the keyboard (scrolling in from the bottom) can cause the mapview to be resized.

 

To workaround this, I've had to put a minHeight value that matches the preferredHeight to stop the mapview shrinking as the keyboard grabs screen real estate.

 

Contributor
Annie_A20
Posts: 11
Registered: ‎03-15-2013
My Device: Developer

Re: Mapview does not render, generates many errors.

Thanks MrRobClarke!.. I tried your workaround and it works for me..