RouteMapInvoker
#include <bb/platform/RouteMapInvoker>
To link against this class, add the following line to your .pro file: LIBS += -lbbplatform
An invoker used to trigger navigation through a map route.
This invoker can be used inside any widget type (in order to give it a certain visual representation) and thus, when that UI component is activated by the user, this invoker will trigger the actual request to display the route information.
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
// For example, you can request a route from Ottawa to Toronto,
// avoiding the highways.
// You can bind properties to values coming from other widgets
// within this QML page (for example, 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)
// that 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();
}
}
}
}
BlackBerry 10.0.0
Inheritance
| bb::platform::MapInvoker | ||
| bb::platform::RouteMapInvoker | ||
Properties Index
Public Functions Index
| RouteMapInvoker (QObject *parent=0) | |
| virtual | ~RouteMapInvoker () |
| double | startLatitude () const |
| double | startLongitude () const |
| QString | startName () const |
| QString | startDescription () const |
| QString | startAddress () const |
| double | endLatitude () const |
| double | endLongitude () const |
| QString | endName () const |
| QString | endDescription () const |
| QString | endAddress () const |
| bb::platform::MapNavigationMode::Type | navigationMode () const |
| bool | isAvoidTollsEnabled () const |
| bool | isAvoidHighwaysEnabled () const |
| bb::platform::MapTransportationMode::Type | transportationMode () const |
| int | altitude () const |
| double | centerLatitude () const |
| double | centerLongitude () const |
| int | heading () const |
| bool | isCurrentLocationEnabled () const |
| double | searchLatitude () const |
| double | searchLongitude () const |
| bb::platform::MapSearchMode::Type | searchMode () const |
| QString | searchText () const |
Public Slots Index
Signals Index
| void | startLatitudeChanged (double newStartLatitude) |
| void | startLongitudeChanged (double newStartLongitude) |
| void | startNameChanged (const QString &newStartName) |
| void | startDescriptionChanged (const QString &newStartDescription) |
| void | startAddressChanged (const QString &newStartAddress) |
| void | endLatitudeChanged (double newEndLatitude) |
| void | endLongitudeChanged (double newEndLongitude) |
| void | endNameChanged (const QString &newEndName) |
| void | endDescriptionChanged (const QString &newEndDescription) |
| void | endAddressChanged (const QString &newEndAddress) |
| void | navigationModeChanged (bb::platform::MapNavigationMode::Type newMode) |
| void | avoidTollsEnabledChanged (bool enable) |
| void | avoidHighwaysEnabledChanged (bool enable) |
| void | transportationModeChanged (bb::platform::MapTransportationMode::Type newMode) |
| void | altitudeChanged (int newAltitude) |
| void | centerLatitudeChanged (double newCenterLatitude) |
| void | centerLongitudeChanged (double newCenterLongitude) |
| void | currentLocationEnabledChanged (bool enable) |
| void | headingChanged (int newHeading) |
| void | searchLatitudeChanged (double newSearchLatitude) |
| void | searchLongitudeChanged (double newSearchLongitude) |
| void | searchModeChanged (bb::platform::MapSearchMode::Type newSearchPattern) |
| void | searchTextChanged (const QString &newSearchText) |
Properties
double
Specifies the start location's latitude.
BlackBerry 10.0.0
double
Specifies the start location's latitude.
BlackBerry 10.0.0
double
Specifies the end location's latitude.
BlackBerry 10.0.0
double
Specifies the end location's longitude.
BlackBerry 10.0.0
bool
Specifies whether the route should avoid any tolls.
BlackBerry 10.0.0
bool
Specifies whether the route should avoid any highways.
BlackBerry 10.0.0
bb::platform::MapTransportationMode::Type
Specifies the mode of transportation (for example, car transportation, pedestrian transportation).
bb::platform::MapTransportationMode for the list of modes of transportation.
BlackBerry 10.0.0
int
Property specifying the map viewing altitude level.
BlackBerry 10.0.0
double
Property containing the map center's latitude.
BlackBerry 10.0.0
double
Property containing the map center's longitude.
BlackBerry 10.0.0
bool
Indicates whether Maps application should start GPS/GeoLocation upon start up.
This will cause the application to perform a transition to device's current location. This is disabled, by default.
BlackBerry 10.0.0
int
Property specifying the orientation for displaying map's contents.
Values are in degrees. Valid values are from 0 to 360. 0 represents a North heading, and 180 represents South heading.
BlackBerry 10.0.0
double
Property containing the search center's latitude.
BlackBerry 10.0.0
double
Property containing the search center's longitude.
BlackBerry 10.0.0
bb::platform::MapSearchMode::Type
Property which specifies a predefined search mode (for example, linear or radial).
bb::platform::MapSearchMode for the list of search modes.
BlackBerry 10.0.0
Public Functions
Constructs a RouteMapInvoker instance.
This is the invoker through which users can set navigation-specific properties.
| Parameters | |
|---|---|
| parent |
If not 0, the supplied parent will be responsible for deleting this instance. |
BlackBerry 10.0.0
virtual
Destructor.
BlackBerry 10.0.0
double
Gets the latitude value of the starting location (for a given navigation route).
The starting point's latitude.
BlackBerry 10.0.0
double
Gets the longitude value of the starting location (for a given navigation route).
The starting point's longitude.
BlackBerry 10.0.0
QString
Gets the name of the starting location (for a given navigation route).
The starting point's name.
BlackBerry 10.0.0
QString
Gets the description of the starting location (for a given navigation route).
The starting point's description.
BlackBerry 10.0.0
QString
Gets the address of the starting location (for a given navigation route).
The starting point's address.
BlackBerry 10.0.0
double
Gets the latitude value of the end location (for a given navigation route).
The end point's latitude.
BlackBerry 10.0.0
double
Gets the longitude value of the end location (for a given navigation route).
The end point's longitude.
BlackBerry 10.0.0
QString
Gets the name of the end location (for a given navigation route).
The end point's name.
BlackBerry 10.0.0
QString
Gets the description of the end location (for a given navigation route).
The end point's description.
BlackBerry 10.0.0
QString
Gets the address of the end location (for a given navigation route).
The end point's address.
BlackBerry 10.0.0
bool
Indicates if the route should try to avoid any tolls (as an option) in determining a navigation route between two locations.
true if the navigation route should try to avoid any tolls, false otherwise.
BlackBerry 10.0.0
bool
Indicates if the route should try to avoid any highways (as an option) in determining a navigation route between two locations.
true if the navigation route should try to avoid any highways, false otherwise.
BlackBerry 10.0.0
bb::platform::MapTransportationMode::Type
Gets the mode of transportation for a given route (for example, use pedestrian as the mode of transportation, or use a car).
bb::platform::MapTransportationMode for the list of modes of transportation.
The transportation mode.
BlackBerry 10.0.0
int 
Returns the map viewing altitude level.
The altitude level value.
BlackBerry 10.0.0
double 
Returns the map center's latitude.
The map center's latitude.
BlackBerry 10.0.0
double 
Returns the map center's longitude.
The map center's longitude.
BlackBerry 10.0.0
int 
Returns the heading for the map's contents.
The heading value.
BlackBerry 10.0.0
bool 
Returns true if map contents should show the current location of the device.
true if contents should display the current location of the device.
BlackBerry 10.0.0
double 
Gets the search center's latitude.
The search center's latitude.
BlackBerry 10.0.0
double 
Gets the search center's longitude.
The search center's longitude.
BlackBerry 10.0.0
bb::platform::MapSearchMode::Type 
Returns the search mode that will be used when performing searches (for example, search along a path or a radial search starting from a given location).
bb::platform::MapSearchMode for the list of available search modes.
The search mode.
BlackBerry 10.0.0
QString 
Gets the search term.
The text value is free-form.
The search text to be used.
BlackBerry 10.0.0
Public Slots
void
Sets the latitude value of the starting location (for a given navigation route).
If the start location is not set, it is assumed that the start location is the device's current location.
| Parameters | |
|---|---|
| value |
The latitude value. |
BlackBerry 10.0.0
void
Resets the latitude value of the starting location to an undefined value.
BlackBerry 10.0.0
void
Sets the longitude value of the starting location (for a given navigation route).
If the start location is not set, it is assumed that the start location is the device's current location.
| Parameters | |
|---|---|
| value |
The longitude value. |
BlackBerry 10.0.0
void
Resets the longitude value of the starting location to an undefined value.
BlackBerry 10.0.0
void
Sets the name of the starting location (for a given navigation route).
| Parameters | |
|---|---|
| name |
The name value. |
BlackBerry 10.0.0
void
Clears the name value of the starting location.
BlackBerry 10.0.0
void
Sets the description of the starting location (for a given navigation route).
| Parameters | |
|---|---|
| description |
The description value. |
BlackBerry 10.0.0
void
Clears the description value of the starting location.
BlackBerry 10.0.0
void
Sets the address of the starting location (for a given navigation route).
| Parameters | |
|---|---|
| address |
The address value. |
BlackBerry 10.0.0
void
Clears the address value of the starting location.
BlackBerry 10.0.0
void
Sets the latitude value of the end location (for a given navigation route).
If the end location is not set, it is assumed that the end location is the device's current location.
| Parameters | |
|---|---|
| value |
The latitude value. |
BlackBerry 10.0.0
void
Resets the latitude value of the end location to an undefined value.
BlackBerry 10.0.0
void
Sets the longitude value of the end location (for a given navigation route).
If the end location is not set, it is assumed that the end location is the device's current location.
| Parameters | |
|---|---|
| value |
The longitude value. |
BlackBerry 10.0.0
void
Resets the longitude value of the end location to an undefined value.
BlackBerry 10.0.0
void
Sets the name of the end location (for a given navigation route).
| Parameters | |
|---|---|
| name |
The name value. |
BlackBerry 10.0.0
void
Clears the name value of the end location.
BlackBerry 10.0.0
void
Sets the description of the end location (for a given navigation route).
| Parameters | |
|---|---|
| description |
The description value. |
BlackBerry 10.0.0
void
Clears the description value of the end location.
BlackBerry 10.0.0
void
Sets the address of the starting location (for a given navigation route).
| Parameters | |
|---|---|
| address |
The address value. |
BlackBerry 10.0.0
void
Clears the name value of the end location.
BlackBerry 10.0.0
void
Enables (or disables) the 'avoid tolls' navigation option.
| Parameters | |
|---|---|
| enable |
true if navigation is to avoid any tolls, false if a route can include tolls. |
BlackBerry 10.0.0
void
Disables the 'avoid tolls' navigation option.
BlackBerry 10.0.0
void
Enables (or disables) the 'avoid highways' navigation option.
| Parameters | |
|---|---|
| enable |
true if navigation is to avoid any highways, false if a route can include highways. |
BlackBerry 10.0.0
void
Disables the 'avoid highways' navigation option.
BlackBerry 10.0.0
void
Sets the mode of transportation.
| Parameters | |
|---|---|
| mode |
The mode of transportation value. See bb::platform::MapTransportationMode for the list of modes of transportation. |
BlackBerry 10.0.0
void
Resets the mode of transportation to bb::platform::MapTransportationMode::Undefined.
BlackBerry 10.0.0
void 
Triggers the actual request.
Depending on the actual invoker instance used, this will send the appropriate request to the Maps application, through the Invocation Framework.
BlackBerry 10.0.0
void 
Resets the map viewing altitude to an undefined value.
BlackBerry 10.0.0
void 
Resets the map center's latitude to undefined value.
BlackBerry 10.0.0
void 
Resets the map center's longitude to an undefined value.
BlackBerry 10.0.0
void 
Disables the display of the current location of the device.
BlackBerry 10.0.0
void 
Resets the map's heading to an undefined value.
BlackBerry 10.0.0
void 
Resets the search latitude to an undefined value.
BlackBerry 10.0.0
void 
Resets the search longitude to an undefined value.
BlackBerry 10.0.0
void 
Resets the search mode to radial search (bb::platform::MapSearchMode::Radial).
BlackBerry 10.0.0
void 
Clears the search text.
BlackBerry 10.0.0
void 
Sets the map viewing altitude level.
| Parameters | |
|---|---|
| value |
The new map viewing altitude. |
BlackBerry 10.0.0
void 
Sets the map center's latitude.
| Parameters | |
|---|---|
| value |
The new latitude of the map's center. |
BlackBerry 10.0.0
void 
Sets the map center's longitude.
| Parameters | |
|---|---|
| value |
The new longitude of the map's center. |
BlackBerry 10.0.0
void 
Enables (or disables) the display of the current location of the device.
| Parameters | |
|---|---|
| enable |
true if current location of the device should be be displayed, false otherwise. |
BlackBerry 10.0.0
void 
Sets the heading for the map's contents.
| Parameters | |
|---|---|
| value |
The new heading. |
BlackBerry 10.0.0
void 
Sets the search center's latitude.
| Parameters | |
|---|---|
| value |
The new search latitude. |
BlackBerry 10.0.0
void 
Sets the search center's longitude.
| Parameters | |
|---|---|
| value |
The new search longitude. |
BlackBerry 10.0.0
void 
Sets the search mode.
| Parameters | |
|---|---|
| mode |
The search mode. |
bb::platform::MapSearchMode for the list of available modes.
BlackBerry 10.0.0
void 
Sets the search term.
| Parameters | |
|---|---|
| text |
The search text. |
BlackBerry 10.0.0
Signals
void
Emitted when the latitude coordinate of the start location changes.
Listeners should update the view to display the start location's new position.
| Parameters | |
|---|---|
| newStartLatitude |
The new latitude of the start location. |
BlackBerry 10.0.0
void
Emitted when the longitude coordinate of the start location changes.
Listeners should update the view to display the start location's new position.
| Parameters | |
|---|---|
| newStartLongitude |
The new longitude of the start location. |
BlackBerry 10.0.0
void
Emitted when the name of the start location changes.
Listeners should update the view to display the start location's new name.
| Parameters | |
|---|---|
| newStartName |
The new name of the start location. |
BlackBerry 10.0.0
void
Emitted when the description of the start location changes.
Listeners should update the view to display the start location's new description.
| Parameters | |
|---|---|
| newStartDescription |
The new description of the start location. |
BlackBerry 10.0.0
void
Emitted when the address of the start location changes.
Listeners should update the view to display the start location's new address.
| Parameters | |
|---|---|
| newStartAddress |
The new address of the start location. |
BlackBerry 10.0.0
void
Emitted when the latitude coordinate of the end location changes.
Listeners should update the view to display the end location's new position.
| Parameters | |
|---|---|
| newEndLatitude |
The new latitude of the end location. |
BlackBerry 10.0.0
void
Emitted when the longitude coordinate of the end location changes.
Listeners should update the view to display the end location's new position.
| Parameters | |
|---|---|
| newEndLongitude |
The new longitude of the end location. |
BlackBerry 10.0.0
void
Emitted when the name of the end location changes.
Listeners should update the view to display the end location's new name.
| Parameters | |
|---|---|
| newEndName |
New name of the end location. |
BlackBerry 10.0.0
void
Emitted when the description of the end location changes.
Listeners should update the view to display the end location's new description.
| Parameters | |
|---|---|
| newEndDescription |
The new description of the end location. |
BlackBerry 10.0.0
void
Emitted when the address of the end location changes.
Listeners should update the view to display the end location's new address.
| Parameters | |
|---|---|
| newEndAddress |
The new address of the end location. |
BlackBerry 10.0.0
void
Emitted when the flag for avoiding road tolls changes.
Listeners should update the view to display the route using this new option value.
| Parameters | |
|---|---|
| enable |
Indicates if toll avoidance is now enabled or not. |
BlackBerry 10.0.0
void
Emitted when the flag for avoiding highways changes.
Listeners should update the view to display the route using this new option value.
| Parameters | |
|---|---|
| enable |
Indicates if highway avoidance is now enabled or not. |
BlackBerry 10.0.0
void
Emitted when the mode of transportation of a route changes.
Listeners should update the view to display the route using this new option value.
| Parameters | |
|---|---|
| newMode |
The new transportation mode. See bb::platform::MapTransportationMode for the list of modes of transportation. |
BlackBerry 10.0.0
void 
Emitted when the viewing altitude changes.
Listeners should update the view to reflect the new altitude.
| Parameters | |
|---|---|
| newAltitude |
The new value of the viewing altitude. |
BlackBerry 10.0.0
void 
Emitted when the latitude coordinate of the map's center changes.
Listeners should update the view to reflect the new map center.
| Parameters | |
|---|---|
| newCenterLatitude |
The new latitude of the map's center. |
BlackBerry 10.0.0
void 
Emitted when the longitude coordinate of the map's center changes.
Listeners should update the view to reflect the new map center.
| Parameters | |
|---|---|
| newCenterLongitude |
The new longitude of the map's center. |
BlackBerry 10.0.0
void 
Emitted when the flag controlling the display of the current device location changes.
Listeners should update the view to display the current location.
| Parameters | |
|---|---|
| enable |
The new value of the flag. |
BlackBerry 10.0.0
void 
Emitted when the map's heading changes.
Listeners should update the view to reflect the new heading.
| Parameters | |
|---|---|
| newHeading |
The new value of the map's heading. |
BlackBerry 10.0.0
void 
Emitted when the latitude coordinate of search location changes.
Listeners should update the view to reflect the new search position.
| Parameters | |
|---|---|
| newSearchLatitude |
The new value of the latitude coordinate. |
BlackBerry 10.0.0
void 
Emitted when the longitude coordinate of search location changes.
Listeners should update the view to reflect the new search position.
| Parameters | |
|---|---|
| newSearchLongitude |
The new value of the longitude coordinate. |
BlackBerry 10.0.0
void 
Emitted when the search mode changes.
Listeners should update to reflect the new search mode.
| Parameters | |
|---|---|
| newSearchPattern |
The new search mode. |
bb::platform::MapSearchMode for the list of available search modes.
BlackBerry 10.0.0
void 
Emitted when the search text changes.
Listeners should update to reflect the new search text.
| Parameters | |
|---|---|
| newSearchText |
The new value of the search text. |
BlackBerry 10.0.0