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
CapQNX
Posts: 119
Registered: ‎01-11-2013
My Device: BlackBerry z10

Map not appear in simulator and device also.

[ Edited ]
 

Hello, friends.. 

 

I am implementing MapView in my application..

I am using below code for MapView..

 

MapView 
{
  id: mapView
  horizontalAlignment: HorizontalAlignment.Fill
}

 I also added import bb.cascades.maps 1.0 & given permission GPS Location, Location  in bar-descriptor.xml

 

When I run application I can see only black screen.

 

I got below error in device log.

 

Feb 11 10:00:16.321    ContextCollection.278294638    <implicit>    0    SHUTDOWN    -----ONLINE-----
Feb 11 10:00:16.321    ContextCollection.278294638    slog2         0    ERROR       ccl_ipc_pps.c(35): ccl_pps_fire_event, PPS open failed 13
Feb 11 10:00:16.321    ContextCollection.278294638    slog2         0    ERROR       ccl_ipc_pps.c(36): ccl_pps_fire_event, reason Permission denied
Feb 11 10:00:16.322    ContextCollection.278294638    slog2         0    ERROR       ccl_ipc_pps.c(35): ccl_pps_fire_event, PPS open failed 13
Feb 11 10:00:16.322    ContextCollection.278294638    slog2         0    ERROR       ccl_ipc_pps.c(36): ccl_pps_fire_event, reason Permission denied

 

 

 

Developer
oliver_kranz
Posts: 216
Registered: ‎09-18-2009
My Device: Z10

Re: Map not appear in simulator and device also.

There is a good example in github on how to use the MapView.

 

https://github.com/blackberry/Cascades-Samples/tree/master/custommapview

 

I know that the MapView does not work if you use WiFi without a SIM card and your firewall blocks unusual ports. Maybe using a SIM card solves the problem. Or there is an error in your code. Then the github example should be a good starting point.

Developer
Curahee
Posts: 226
Registered: ‎01-12-2013
My Device: z30

Re: Map not appear in simulator and device also.

You have to change the altitude. That's a value in meters on how far the camera is above the ground. You can find it in the documentation.

 

altitude: 10000

 

Documentation: https://developer.blackberry.com/cascades/reference/bb__cascades__maps__mapview.html

______________________________________________________
BB10-OAuth: GitHub
Developer
oliver_kranz
Posts: 216
Registered: ‎09-18-2009
My Device: Z10

Re: Map not appear in simulator and device also.

Yes, if the connection works then setting the altitude is a solution.

Developer
CapQNX
Posts: 119
Registered: ‎01-11-2013
My Device: BlackBerry z10

Re: Map not appear in simulator and device also.

[ Edited ]

I set altitude: 10000, still map is not appear in device. I can see only white screen..

I found below error in Console

 

 

eglSwapBuffers: an EGLSurface argument does not name a valid surface configured for rendering

 

WindowToWorld: lat=0.000000 lon=0.000000
centerX=384 centerY=514

 

 

Developer
steve8820
Posts: 78
Registered: ‎04-04-2013
My Device: BB10 Dev Alpha Simulator

Re: Map not appear in simulator and device also.

Hi,

Im currently testing on mapview as well. Does the mapview only can be tested on device and not simulator? Just wanna confirm this.

Thank you.
Regards,

Steve Chan
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Map not appear in simulator and device also.

I have read in other posts that BB Maps does not work in the simulator. Don't know why, because other mapping solutions work fine in the simulator.
Developer
steve8820
Posts: 78
Registered: ‎04-04-2013
My Device: BB10 Dev Alpha Simulator

Re: Map not appear in simulator and device also.

Yes. Thats what i understand too. But what kind of other mapping solutions you mentionaing? Im interested on other options instead of mapview.

Regards,

Steve Chan
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Map not appear in simulator and device also.

Other solutions are using a WebView to use with HTML based map providers (e.g. Google, MapQuest), or you create your own SDK like we did (not Cascades).
Developer
steve8820
Posts: 78
Registered: ‎04-04-2013
My Device: BB10 Dev Alpha Simulator

Re: Map not appear in simulator and device also.

Thanks for the solution. Will try this alternative.
Regards,

Steve Chan