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
gavoh
Posts: 23
Registered: ‎10-08-2012
My Device: 9800
My Carrier: vodafone
Accepted Solution

Hang on using Maps sample

Hi,

I want to use Maps on Cascades BB10, I develop a sample app as following

 

import bb.cascades 1.0
import bb.platform 1.0
 
Page {
  content: Container {
     layout: DockLayout {}
 
     attachedObjects:[  
        RouteMapInvoker {
           id: routeInvokerID
              
           // This example shows binding properties to pre-defined values (e.g. request of a route from Ottawa to Toronto, avoiding the highways).
           // One can bind properties to values coming from other widgets within this QML page (e.g. text field's input)
           startLatitude    :  45.416667         // Ottawa's latitude
           startLongitude   : -75.7              // Ottawa's longitude
           startName        : "Ottawa, Ontario"
           startDescription : "Canada's capital"
 
           endLatitude      : 43.652527          // Toronto's latitude
           endLongitude     : -79.381961         // Toronto's longitude
           endName          : "Toronto, Ontario"
           endDescription   : "My trip's destination"
 
           // Specify any extra route options...
           avoidHighwaysEnabled : true
 
           // Specify what should be the center of the map.
           centerLatitude : 44.4555
           centerLongitude : -77.7744
           // 'heading' property is not explicitly set, so it will be: 0 (i.e., facing North).
 
        }
     ]
 
     // Make a Cascades button (or any Cascades widget) which can be used to trigger route invoker.
     Button {            
        verticalAlignment: VerticalAlignment.Center
        horizontalAlignment: HorizontalAlignment.Center
 
        text: "Get route"
 
         // When button is clicked, call the invoker by its ID            
         onClicked: {
            routeInvokerID.go();
         }
     }
  }
}

 I put add on .pro file this code

LIBS +=-lbbplatform -lQtLocationSubset -lbbmultimedia  -lbbcascadesmaps -lGLESv1_CM

 And I add location premestion to the bar-descriptor.xml

 

My problem is:

When run the app on the simulator, it hang as follwong image

Hang

 

Notes:

1- I faced the same problem when I download and run this sample app of rim 

2- I am using the last NDK and simulator version 10_0_9_1673

 

Please Help

 

Thanks

Please use plain text.
Developer
bobdodd
Posts: 116
Registered: ‎10-31-2012
My Device: BB10 Dev Alpha B
My Carrier: -

Re: Hang on using Maps sample

Won't you need a MapView as well?eg.

 

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

 

Please use plain text.
Developer
borceg
Posts: 670
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: Hang on using Maps sample

[ Edited ]
Please use plain text.
Contributor
gavoh
Posts: 23
Registered: ‎10-08-2012
My Device: 9800
My Carrier: vodafone

Re: Hang on using Maps sample

Thanks, Is these samples works on simulator?

Please use plain text.
Developer
borceg
Posts: 670
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: Hang on using Maps sample

Yes they work (sometimes slow, but depends on your pc configuration).
Please use plain text.
Contributor
gavoh
Posts: 23
Registered: ‎10-08-2012
My Device: 9800
My Carrier: vodafone

Re: Hang on using Maps sample

@borceg
MapView sample works fine, but routemapinvokerhis didn't work with me, when I click "get route" nothing happened
Please use plain text.
Regular Contributor
ametller
Posts: 54
Registered: ‎07-15-2010
My Device: Not Specified

Re: Hang on using Maps sample

@gavoh

The RouteMapInvoker doesn't work as it needs the BlackBerry 10 Maps application, which is not available on the Dev Alpha. This application will only be available on the normal devices when they are released.

Please use plain text.
Contributor
gavoh
Posts: 23
Registered: ‎10-08-2012
My Device: 9800
My Carrier: vodafone

Re: Hang on using Maps sample

@ametller
Thanks a lot, but Is there remote testing for BB10, because I haven't any BB10 dev decive
Please use plain text.
Regular Contributor
ametller
Posts: 54
Registered: ‎07-15-2010
My Device: Not Specified

Re: Hang on using Maps sample

@gavoh

As far as I know not yet. We should wait until BB10 hits the street in order to test RouteMapInvoker API...

Please use plain text.