12-17-2012 06:33 AM
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
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
Solved! Go to Solution.
12-17-2012 07:17 AM
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;
}
}
}
}
12-17-2012 07:25 AM - edited 12-17-2012 07:25 AM
For map samples use this: https://github.com/blackberry/Cascades-Samples/tre
for route shown on map https://github.com/blackberry/Cascades-Samples/tre
12-17-2012 08:12 AM
Thanks, Is these samples works on simulator?
12-17-2012 08:26 AM
12-17-2012 09:12 AM
12-17-2012 10:05 AM
@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.
12-17-2012 10:30 AM
12-17-2012 10:33 AM
@gavoh
As far as I know not yet. We should wait until BB10 hits the street in order to test RouteMapInvoker API...