MapInvoker

Since: BlackBerry 10.0.0

#include <bb/platform/MapInvoker>

To link against this class, add the following line to your .pro file: LIBS += -lbbplatform

Stores common properties that can be set in order to trigger map-related content requests.

To gain access to more specific map requests, users should use sub-classes of this class (for example, bb::platform::LocationMapInvoker and bb::platform::RouteMapInvoker). This class also performs the actual map request through the Invocation Framework API.


Overview

Public Functions Index

virtual ~MapInvoker ()
intaltitude () const
doublecenterLatitude () const
doublecenterLongitude () const
intheading () const
boolisCurrentLocationEnabled () const
doublesearchLatitude () const
doublesearchLongitude () const
bb::platform::MapSearchMode::TypesearchMode () const
QStringsearchText () const

Public Slots Index

voidgo ()
voidresetAltitude ()
voidresetCenterLatitude ()
voidresetCenterLongitude ()
voidresetCurrentLocationEnabled ()
voidresetHeading ()
voidresetSearchLatitude ()
voidresetSearchLongitude ()
voidresetSearchMode ()
voidresetSearchText ()
voidsetAltitude (int value)
voidsetCenterLatitude (double value)
voidsetCenterLongitude (double value)
voidsetCurrentLocationEnabled (bool enable)
voidsetHeading (int value)
voidsetSearchLatitude (double value)
voidsetSearchLongitude (double value)
voidsetSearchMode (bb::platform::MapSearchMode::Type mode)
voidsetSearchText (const QString &text)

Signals Index

voidaltitudeChanged (int newAltitude)
voidcenterLatitudeChanged (double newCenterLatitude)
voidcenterLongitudeChanged (double newCenterLongitude)
voidcurrentLocationEnabledChanged (bool enable)
voidheadingChanged (int newHeading)
voidsearchLatitudeChanged (double newSearchLatitude)
voidsearchLongitudeChanged (double newSearchLongitude)
voidsearchModeChanged (bb::platform::MapSearchMode::Type newSearchPattern)
voidsearchTextChanged (const QString &newSearchText)

Properties

int altitude

Property specifying the map viewing altitude level.

Since:

BlackBerry 10.0.0

double centerLatitude

Property containing the map center's latitude.

Since:

BlackBerry 10.0.0

double centerLongitude

Property containing the map center's longitude.

Since:

BlackBerry 10.0.0

bool currentLocationEnabled

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.

Since:

BlackBerry 10.0.0

int heading

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.

Since:

BlackBerry 10.0.0

double searchLatitude

Property containing the search center's latitude.

Since:

BlackBerry 10.0.0

double searchLongitude

Property containing the search center's longitude.

Since:

BlackBerry 10.0.0

bb::platform::MapSearchMode::Type searchMode

Property which specifies a predefined search mode (for example, linear or radial).

See also:

bb::platform::MapSearchMode for the list of search modes.

Since:

BlackBerry 10.0.0

QString searchText

Property containing the actual user's search text.

Since:

BlackBerry 10.0.0

Public Functions

virtual~MapInvoker ()

Destructor.

Since:

BlackBerry 10.0.0

int altitude ()

Returns the map viewing altitude level.

Return:

The altitude level value.

Since:

BlackBerry 10.0.0

double centerLatitude ()

Returns the map center's latitude.

Return:

The map center's latitude.

Since:

BlackBerry 10.0.0

double centerLongitude ()

Returns the map center's longitude.

Return:

The map center's longitude.

Since:

BlackBerry 10.0.0

int heading ()

Returns the heading for the map's contents.

Return:

The heading value.

Since:

BlackBerry 10.0.0

bool isCurrentLocationEnabled ()

Returns true if map contents should show the current location of the device.

Return:

true if contents should display the current location of the device.

Since:

BlackBerry 10.0.0

double searchLatitude ()

Gets the search center's latitude.

Return:

The search center's latitude.

Since:

BlackBerry 10.0.0

double searchLongitude ()

Gets the search center's longitude.

Return:

The search center's longitude.

Since:

BlackBerry 10.0.0

bb::platform::MapSearchMode::Type searchMode ()

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).

See also:

bb::platform::MapSearchMode for the list of available search modes.

Return:

The search mode.

Since:

BlackBerry 10.0.0

QString searchText ()

Gets the search term.

The text value is free-form.

Return:

The search text to be used.

Since:

BlackBerry 10.0.0

Public Slots

void go ()

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.

Since:

BlackBerry 10.0.0

void resetAltitude ()

Resets the map viewing altitude to an undefined value.

Since:

BlackBerry 10.0.0

void resetCenterLatitude ()

Resets the map center's latitude to undefined value.

Since:

BlackBerry 10.0.0

void resetCenterLongitude ()

Resets the map center's longitude to an undefined value.

Since:

BlackBerry 10.0.0

void resetCurrentLocationEnabled ()

Disables the display of the current location of the device.

Since:

BlackBerry 10.0.0

void resetHeading ()

Resets the map's heading to an undefined value.

Since:

BlackBerry 10.0.0

void resetSearchLatitude ()

Resets the search latitude to an undefined value.

Since:

BlackBerry 10.0.0

void resetSearchLongitude ()

Resets the search longitude to an undefined value.

Since:

BlackBerry 10.0.0

void resetSearchMode ()

Resets the search mode to radial search (bb::platform::MapSearchMode::Radial).

Since:

BlackBerry 10.0.0

void resetSearchText ()

Clears the search text.

Since:

BlackBerry 10.0.0

void setAltitude (
  • intvalue)

Sets the map viewing altitude level.

Parameters
value

The new map viewing altitude.

Since:

BlackBerry 10.0.0

void setCenterLatitude (
  • doublevalue)

Sets the map center's latitude.

Parameters
value

The new latitude of the map's center.

Since:

BlackBerry 10.0.0

void setCenterLongitude (
  • doublevalue)

Sets the map center's longitude.

Parameters
value

The new longitude of the map's center.

Since:

BlackBerry 10.0.0

void setCurrentLocationEnabled (
  • boolenable)

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.

Since:

BlackBerry 10.0.0

void setHeading (
  • intvalue)

Sets the heading for the map's contents.

Valid values are in degrees, between 0 and 360.
Parameters
value

The new heading.

Since:

BlackBerry 10.0.0

void setSearchLatitude (
  • doublevalue)

Sets the search center's latitude.

Parameters
value

The new search latitude.

Since:

BlackBerry 10.0.0

void setSearchLongitude (
  • doublevalue)

Sets the search center's longitude.

Parameters
value

The new search longitude.

Since:

BlackBerry 10.0.0

void setSearchMode (

Sets the search mode.

Parameters
mode

The search mode.

See also:

bb::platform::MapSearchMode for the list of available modes.

Since:

BlackBerry 10.0.0

void setSearchText (

Sets the search term.

Parameters
text

The search text.

Since:

BlackBerry 10.0.0

Signals

void altitudeChanged (
  • intnewAltitude)

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.

Since:

BlackBerry 10.0.0

void centerLatitudeChanged (
  • doublenewCenterLatitude)

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.

Since:

BlackBerry 10.0.0

void centerLongitudeChanged (
  • doublenewCenterLongitude)

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.

Since:

BlackBerry 10.0.0

void currentLocationEnabledChanged (
  • boolenable)

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.

Since:

BlackBerry 10.0.0

void headingChanged (
  • intnewHeading)

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.

Since:

BlackBerry 10.0.0

void searchLatitudeChanged (
  • doublenewSearchLatitude)

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.

Since:

BlackBerry 10.0.0

void searchLongitudeChanged (
  • doublenewSearchLongitude)

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.

Since:

BlackBerry 10.0.0

void searchModeChanged (

Emitted when the search mode changes.

Listeners should update to reflect the new search mode.

Parameters
newSearchPattern

The new search mode.

See also:

bb::platform::MapSearchMode for the list of available search modes.

Since:

BlackBerry 10.0.0

void searchTextChanged (

Emitted when the search text changes.

Listeners should update to reflect the new search text.

Parameters
newSearchText

The new value of the search text.

Since:

BlackBerry 10.0.0

Last modified: 2014-03-13

comments powered by Disqus