class CPosLmNearestCriteria : public CPosLmSearchCriteria |
Criterion for finding the landmarks which are closest to a certain coordinate, called "center coordinate".
When using CPosLmNearestCriteria , the matches returned in the search are sorted in ascending distance order if the client does not specify other sort preferences.
By default, this search returns all landmarks in the database, except those which have no coordinates. It is recommended to specify a maximum distance to narrow down the search. This is done by SetMaxDistance .
The client can specify if the coverage radius should be used. If coverage radius is used, the distance to the landmark coverage area border is used instead of the distance to the landmark coverage area center. If the source coordinate is inside the landmark coverage area, the distance is considered zero. By default, the coverage radius is not used.
This criterion is only valid when searching for landmarks, i.e. if it is passed to CPosLandmarkSearch::StartCategorySearchL, the function will fail with error code KErrArgument.
Public Member Functions | |
---|---|
~CPosLmNearestCriteria() | |
IMPORT_C void | GetCoordinate(TCoordinate &) |
IMPORT_C TReal32 | MaxDistance() |
IMPORT_C CPosLmNearestCriteria * | NewLC(const TCoordinate &, TBool) |
IMPORT_C void | SetCoordinate(const TCoordinate &) |
IMPORT_C void | SetMaxDistance(TReal32) |
IMPORT_C void | SetUseCoverageRadius(TBool) |
IMPORT_C TBool | UseCoverageRadius() |
Private Member Functions | |
---|---|
CPosLmNearestCriteria(TBool) | |
CPosLmNearestCriteria(const CPosLmNearestCriteria &) | |
void | ConstructL(const TCoordinate &) |
CPosLmNearestCriteria & | operator=(const CPosLmNearestCriteria &) |
Inherited Enumerations | |
---|---|
CPosLmSearchCriteria:TCriteriaType |
Private Attributes | |
---|---|
TCoordinate | iCenterCoordinate |
TReal32 | iMaxDistance |
TBool | iUseCoverageRadius |
CPosLmNearestCriteria | ( | TBool | aUseCoverageRadius | ) | [private] |
TBool aUseCoverageRadius |
CPosLmNearestCriteria | ( | const CPosLmNearestCriteria & | ) | [private] |
const CPosLmNearestCriteria & |
void | ConstructL | ( | const TCoordinate & | aCoordinate | ) | [private] |
const TCoordinate & aCoordinate |
IMPORT_C void | GetCoordinate | ( | TCoordinate & | aCoordinate | ) | const |
Returns the center coordinate of the search.
TCoordinate & aCoordinate | On return, contains the center coordinate. |
IMPORT_C TReal32 | MaxDistance | ( | ) | const |
Returns whether the search should be limited to landmarks which are closer than a maximum distance.
By default the maximum distance is set to NaN which means that the distance is unlimited.
IMPORT_C CPosLmNearestCriteria * | NewLC | ( | const TCoordinate & | aCoordinate, |
TBool | aUseCoverageRadius = EFalse | |||
) | [static] |
Two-phased constructor.
Latitude and longitude must be set in the coordinate (not NaN). Altitude is ignored.
const TCoordinate & aCoordinate | The center coordinate of the landmark search. |
TBool aUseCoverageRadius = EFalse | ETrue if coverage radius should be considered in the search. |
IMPORT_C void | SetCoordinate | ( | const TCoordinate & | aCoordinate | ) |
Set the center coordinate of the search.
Latitude and longitude must be set in the coordinate (not NaN). Altitude is ignored.
const TCoordinate & aCoordinate | The center coordinate of the landmarks search. |
IMPORT_C void | SetMaxDistance | ( | TReal32 | aMaxDistance | ) |
Set a maximum distance for the search.
Only landmarks, which are closer to the center coordinate than the maximum distance are considered matches.
TReal32 aMaxDistance | The maximum distance or NaN if the distance should be unlimited. |
IMPORT_C void | SetUseCoverageRadius | ( | TBool | aUseCoverageRadius | ) |
Set if coverage radius should be considered in the search.
TBool aUseCoverageRadius | ETrue if coverage radius should be considered in the search. EFalse otherwise. |
IMPORT_C TBool | UseCoverageRadius | ( | ) | const |
Returns if coverage radius is considered in the search.
CPosLmNearestCriteria & | operator= | ( | const CPosLmNearestCriteria & | ) | [private] |
const CPosLmNearestCriteria & |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.