SelectedPlace

Since: BlackBerry 10.0.0

#include <bb/cascades/places/SelectedPlace>

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

An object returned by PlacePicker.

SelectedPlace contains the value of the place object that the user selected, which comes from the places database or the results of an online search.


Overview

Properties Index

QStringaddressLabel [read-only]
QStringalternativeName [read-only]
doublealtitude [read-only]
QStringcity [read-only]
QStringcountry [read-only]
QStringdescription [read-only]
QStringemail [read-only]
QStringfax [read-only]
doublehorizontalAccuracy [read-only]
QVariantimage [read-only]
QStringisoAlpha2CountryCode [read-only]
QStringisoAlpha3CountryCode [read-only]
boolisPhysicalLocation [read-only]
doublelatitude [read-only]
doublelongitude [read-only]
QUrlmapURL [read-only]
QStringname [read-only]
QStringphone [read-only]
intplaceId [read-only]
QStringpostal [read-only]
doublerating [read-only]
QStringregion [read-only]
QStringsecondaryPhone [read-only]
QStringstreet [read-only]
QUrlurl [read-only]
doubleverticalAccuracy [read-only]

Public Functions Index

virtual ~SelectedPlace ()
QStringaddressLabel () const
QStringalternativeName () const
doublealtitude () const
QStringcity () const
QStringcountry () const
QStringdescription () const
QStringemail () const
QStringfax () const
QByteArraygetRawImage (SelectedPlaceImageType::Type &imageType) const
doublehorizontalAccuracy () const
intid () const
QVariantimage () const
QStringisoAlpha2CountryCode () const
QStringisoAlpha3CountryCode () const
boolisPhysicalLocation () const
doublelatitude () const
doublelongitude () const
QUrlmapURL () const
QStringname () const
QStringphone () const
QStringpostal () const
doublerating () const
QStringregion () const
QStringsecondaryPhone () const
QStringstreet () const
QUrlurl () const
doubleverticalAccuracy () const

Properties

QString addressLabel[read-only]

Represents the complete address label if available.

Since:

BlackBerry 10.0.0

QString alternativeName[read-only]

Represents the place's alternative name if available.

The value of this property is the official name of the selected place such as the name of a business, POI, or a contact obtained from a search.

Since:

BlackBerry 10.0.0

double altitude[read-only]

Represents the place's altitude if available.

The value of this property is the altitude of the place. If the place is not a physical location or altitude information is not available, this value is a quiet NaN. You can use if (!isNaN(var.altitude)) to check if the value is valid or not.

Since:

BlackBerry 10.0.0

QString city[read-only]

Represents the place's city name if available.

This property is the city name of the selected place. If this information is not available, the value is an empty string.

Since:

BlackBerry 10.0.0

QString country[read-only]

Represents the place's country name if available.

The value of this property is the country name of the place. If this information is not available, the value is an empty string.

Since:

BlackBerry 10.0.0

QString description[read-only]

Represents the place's description if available.

This is a short description of the place.

Since:

BlackBerry 10.0.0

QString email[read-only]

Represents the place's email address if available.

The value of this property is the email address associated with the place. If this information is not available, the value is an empty string.

Since:

BlackBerry 10.0.0

QString fax[read-only]

Represents the place's fax number if available.

The value of this property is the fax number of the place. If this information is not available, the value is an empty string.

Since:

BlackBerry 10.0.0

double horizontalAccuracy[read-only]

Represents the accuracy of the place's latitude and longitude data.

This property is valid only if the latitude and longitude data are available and their accuracy data is available. If the place is not a physical location, or accuracy data is not available, this value is a quiet NaN. You can use if (!isNaN(var.horizontalAccuracy)) to check if the value is valid or not.

Since:

BlackBerry 10.0.0

QVariant image[read-only]

Represents the place's map image if available.

The value of this property is the static image of the place. Inside the QVariant it is a bb::cascades::Image class object set by QVariant::fromValue(). If this information is not available (for example, this place is not a physical location or the location of this place is out of map data coverage), this value is an empty object.

Since:

BlackBerry 10.0.0

QString isoAlpha2CountryCode[read-only]

Represents the place's ISO 3166 alpha 2 country code if available.

The value of this property is the two-letter code established by the ISO 3166 Alpha 2 standard that uniquely represents the country. If this information is not available, the value is an empty string.

Since:

BlackBerry 10.2.0

QString isoAlpha3CountryCode[read-only]

Represents the place's ISO 3166 alpha 3 country code if available.

The value of this property is the three-letter code established by the ISO 3166 Alpha 3 standard that uniquely represents the country. If this information is not available, the value is an empty string.

Since:

BlackBerry 10.2.0

bool isPhysicalLocation[read-only]

Indicates whether the selected place is a physical location or not.

A Boolean value of true indicates the place has latitude and longitude coordinates, false indicates the selected location is not a physical location.

Since:

BlackBerry 10.0.0

double latitude[read-only]

Represents the place's latitude coordinate if available.

The value of this property is the latitude coordinate of the place. If the place is not a physical location, this value is a quiet NaN. You can use if (!isNaN(var.latitude)) to check if the value is valid or not.

Since:

BlackBerry 10.0.0

double longitude[read-only]

Represents the place's longitude coordinate if available.

The value of this property is the longitude coordinate of the place. If the place is not a physical location, this value is a quiet NaN. You can use if (!isNaN(var.longitude)) to check if the value is valid or not.

Since:

BlackBerry 10.0.0

QUrl mapURL[read-only]

Represents the place's map link URL if available.

The value of this property is the map URL of the place. If this information is not available, the value is an empty object. To correctly represent a clickable URL to the user, please use the QUrl::toEncoded() function instead of QUrl::toString().

Since:

BlackBerry 10.0.0

QString name[read-only]

Represents user-defined place name if available.

By default, the user defined place name is the same as the alternative name for point of interest (POI) and contact.

Since:

BlackBerry 10.0.0

QString phone[read-only]

Represents the place's main phone number if available.

The value of this property is the main phone number of the place. If this information is not available, the value is an empty string.

Since:

BlackBerry 10.0.0

int placeId[read-only]

Represents the system identifier of the selected place.

Since:

BlackBerry 10.0.0

QString postal[read-only]

Represents the place's postal code if available.

The value of this property is the postal code of the place. If this information is not available, the value is an empty string.

Since:

BlackBerry 10.0.0

double rating[read-only]

Represents the place's rating if available.

If a place is a business, the value is its rating. If the rating information is not available, the value is a quiet NaN. Rating range is TBD.

Since:

BlackBerry 10.0.0

QString region[read-only]

Represents the place's region name such as State or Province if available.

The value of this property is the state or province name of the place. If this information is not available, the value is an empty string.

Since:

BlackBerry 10.0.0

QString secondaryPhone[read-only]

Represents the place's secondary phone number if available.

The value of this property is the secondary phone number of the place. If this information is not available, the value is an empty string.

Since:

BlackBerry 10.0.0

QString street[read-only]

Represents the place's street address if available.

If the place is a physical location, this property is the street address. If this information is not available (for example the selected place is a city), the value of this property is an empty string.

Since:

BlackBerry 10.0.0

QUrl url[read-only]

Represents the place's web site URL if available.

The value of this property is the web site of the place. If this information is not available, this method returns an empty object. To correctly represent a clickable URL to the user, please use the QUrl::toEncoded() function instead of QUrl::toString().

Since:

BlackBerry 10.0.0

double verticalAccuracy[read-only]

Represents accuracy of the place's altitude data.

This property is valid only if the altitude is available and its accuracy data is available. If the place is not a physical location, or accuracy data is not available, this value is a quiet NaN. You can use if (!isNaN(var.verticalAccuracy)) to check if the value is valid or not.

Since:

BlackBerry 10.0.0

Public Functions

virtual~SelectedPlace ()

Destructor.

Since:

BlackBerry 10.0.0

QString addressLabel ()

Returns the complete address label if available.

This method returns a fully formatted address in accordance to local address standards. If the place is not a physical place, this method returns an empty string.

Return:

QString

Since:

BlackBerry 10.0.0

QString alternativeName ()

Returns the place's alternative name if available.

This method returns the official name of the selected place such as the name of a business, POI, or a contact obtained from a search.

Return:

QString

Since:

BlackBerry 10.0.0

double altitude ()

Returns the place's altitude relative to sea level, in meters, if available.

This method returns the altitude of the place, relative to sea level, in meters. If the place is not a physical location, or altitude data is not available, this method returns a quiet NaN.

Return:

double

Since:

BlackBerry 10.0.0

QString city ()

Returns the place's city name if available.

This method returns the city name of the selected place. If this information is not available, this method returns an empty string.

Return:

QString

Since:

BlackBerry 10.0.0

QString country ()

Returns the place's country name if available.

This method returns the country name of the place. If this information is not available, this method returns an empty string.

Return:

QString

Since:

BlackBerry 10.0.0

QString description ()

Returns the place's description if available.

This method returns the short description of the place.

Return:

QString

Since:

BlackBerry 10.0.0

QString email ()

Returns the place's email address if available.

This method returns the email address associated with the place. If this information is not available, this method returns an empty string.

Return:

QString

Since:

BlackBerry 10.0.0

QString fax ()

Returns the place's fax number if available.

This method returns the fax number of the place. If this information is not available, this method returns an empty string.

Return:

QString

Since:

BlackBerry 10.0.0

QByteArray getRawImage (

Returns the place's map image if available, and its type.

This method returns binary data of a static image of the place. If this information is not available (for example, the place is not a physical location or the location of this place is out of map data coverage), this method returns an empty object. This method is also used for JSON encoding.

Warning!

This is a blocking function that may require network access and should not be used on the event thread. To retrieve the image asynchronously, use the MapImageGenerator class.

Parameters
imageType

SelectedPlaceImageType.

Return:

QByteArray

Since:

BlackBerry 10.0.0

double horizontalAccuracy ()

Returns the accuracy of the place's latitude and longitude data.

This value is valid only if latitude and longitude data are available and their accuracy data is available.

The method returns the accuracy of place's latitude and longitude in meters. If the place is not a physical location, or accuracy data is not available, this method returns a quiet NaN.

Return:

double

Since:

BlackBerry 10.0.0

int id ()

Returns the system identifier of the selected place.

Return:

int The system identifier of the selected place.

Since:

BlackBerry 10.0.0

QVariant image ()

Returns the place's map image if available.

This method returns the static image of the place. Inside the QVariant is a bb::cascades::Image class object set by QVariant::fromValue(). If this information is not available (i.e. not a physical location, location is out of map data coverage), this method returns an empty object.

Warning!

This is a blocking function that may require network access and should not be used on the event thread. To retrieve the image asynchronously, use the MapImageGenerator class.

Return:

QVariant

Since:

BlackBerry 10.0.0

QString isoAlpha2CountryCode ()

Returns the place's ISO 3166 alpha 2 country code if available.

This method returns the two-letter code established by the ISO 3166 Alpha 2 standard that uniquely represents the country. If this information is not available, this method returns an empty string.

Return:

QString

Since:

BlackBerry 10.2.0

QString isoAlpha3CountryCode ()

Returns the place's ISO 3166 alpha 3 country code if available.

This method returns the three-letter code established by the ISO 3166 Alpha 3 standard that uniquely represents the country. If this information is not available, this method returns an empty string.

Return:

QString

Since:

BlackBerry 10.2.0

bool isPhysicalLocation ()

Indicates whether the selected place is a physical location or not.

Return:

true indicates the place has latitude and longitude coordinates, false indicates the selected location is not a physical location.

Since:

BlackBerry 10.0.0

double latitude ()

Returns the place's latitude coordinate if available.

This method returns the latitude coordinate of the place, in decimal degrees. If the place is not a physical location, this method returns a quiet NaN.

Return:

double

Since:

BlackBerry 10.0.0

double longitude ()

Returns the place's longitude coordinate if available.

This method returns the longitude coordinate of the place, in decimal degrees. If the place is not a physical location, this method returns a quiet NaN.

Return:

double

Since:

BlackBerry 10.0.0

QUrl mapURL ()

Returns the place's map link URL if available.

This method returns the map URL of the place. If this information is not available, this method returns an empty object. To correctly represent a clickable URL to the user, please use the QUrl::toEncoded() function instead of QUrl::toString().

Return:

QUrl

Since:

BlackBerry 10.0.0

QString name ()

Returns the user-defined place name if available.

By default, the user defined place name is the same as the alternative name for point of interest (POI) and contact.

Return:

QString

Since:

BlackBerry 10.0.0

QString phone ()

Returns the place's main phone number if available.

This method returns the main phone number of the place. If this information is not available, this method returns an empty string.

Return:

QString

Since:

BlackBerry 10.0.0

QString postal ()

Returns the place's postal code if available.

This method returns the postal code of the place. If this information is not available, this method returns an empty string.

Return:

QString

Since:

BlackBerry 10.0.0

double rating ()

Returns the place's rating if available.

If a place is a business, this method returns its rating. If the rating information is not available, this method returns a quiet NaN. Rating range is TBD.

Return:

double

See also:

POIAuxiliaryData

Since:

BlackBerry 10.0.0

QString region ()

Returns the place's region name such as State or Province if available.

This method returns the state or province name of the place. If this information is not available, this method returns an empty string.

Return:

QString

Since:

BlackBerry 10.0.0

QString secondaryPhone ()

Returns the place's secondary phone number if available.

This method returns the secondary phone number of the place. If this information is not available, this method returns an empty string.

Return:

QString

Since:

BlackBerry 10.0.0

QString street ()

Returns the place's street address if available.

If the place is a physical location, this method returns the street address. If this information is not available (for example, the selected place is a city), this method returns an empty string.

Return:

QString

Since:

BlackBerry 10.0.0

QUrl url ()

Returns the place's web site URL if available.

This method returns the web site of the place. If this information is not available, this method returns an empty object. To correctly represent a clickable URL to the user, please use the QUrl::toEncoded() function instead of QUrl::toString().

Return:

QUrl

Since:

BlackBerry 10.0.0

double verticalAccuracy ()

Returns the accuracy of the place's altitude data.

This value is valid only if altitude data is available and its accuracy data is available.

The method returns the accuracy of place's altitude in meters. If the place is not a physical location, or accuracy data is not available, this method returns a quiet NaN.

Return:

double

Since:

BlackBerry 10.0.0

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus