CPosLmAreaCriteria Class Reference

API published in: S60 3rd Ed

Link against: eposlmsearchlib.lib eposlmmultidbsearch.lib

Capability Information

Required Capabilities

None

Exceptions

The capability ReadUserData is required in:

CPosLandmarkSearch::StartLandmarkSearchL( const CPosLmSearchCriteria & aCriteria, TBool aSearchOnlyPreviousMatches = EFalse );

CPosLandmarkSearch::StartLandmarkSearchL( const CPosLmSearchCriteria & aCriteria, const TPosLmSortPref & aSortPref, TBool aSearchOnlyPreviousMatches = EFalse );

CPosLandmarkSearch::StartCategorySearchL( const CPosLmSearchCriteria & aCriteria, CPosLmCategoryManager::TCategorySortPref aSortPref, TBool aSearchOnlyPreviousMatches = EFalse );

CPosLmMultiDbSearch::StartLandmarkSearchL( const CPosLmSearchCriteria & aCriteria, TBool aSearchOnlyPreviousMatches = EFalse );

CPosLmMultiDbSearch::StartLandmarkSearchL( const CPosLmSearchCriteria & aCriteria, const TPosLmSortPref & aSortPref, TBool aSearchOnlyPreviousMatches = EFalse );

CPosLmMultiDbSearch::StartCategorySearchL( const CPosLmSearchCriteria & aCriteria, CPosLmCategoryManager::TCategorySortPref aSortPref, TBool aSearchOnlyPreviousMatches = EFalse );

Other Information

The capability NetworkServices is required to work with remote databases.


#include <epos_cposlmareacriteria.h>

Inherits CPosLmSearchCriteria.


Detailed Description

Criterion for searching for landmarks which reside in a certain area.

The search area is defined by providing two latitude and two longitude values which specify the borders of the area. Note that this search does not consider landmark coverage radius, see CPosLandmark::GetCoverageRadius.

The search area is defined as a spherical rectangle, limited by two longitude borders (WestLongitude and EastLongitude) and two latitude borders (SouthLatitude and NorthLatitude).

It is required that -90 =< SouthLatitude =< NorthLatitude =< 90. WestLongitude must be in the interval [-180, 180), i.e. not including +180. EastLongitude must be in the interval [-180, 180], i.e. including +180. It is allowed that EastLongitude < WestLongitude. This defines an area which crosses the 180 meridian. The area definition is inclusive, i.e. landmarks which lie on the border of the area will be considered as matches. If WestLongitude = EastLongitude and NorthLatitude = SouthLatitude then only landmarks which match the longitude and latitude respectively, are considered to be matches. If WestLongitude = -180 and EastLongitude = +180, all longitudes are included in the search.

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

virtual  ~CPosLmAreaCriteria ()
  Destructor.
IMPORT_C void  GetSearchArea (TReal64 &aSouthLatitude, TReal64 &aNorthLatitude, TReal64 &aWestLongitude, TReal64 &aEastLongitude) const
  Returns the search area.
IMPORT_C TInt  SetSearchArea (const TReal64 &aSouthLatitude, const TReal64 &aNorthLatitude, const TReal64 &aWestLongitude, const TReal64 &aEastLongitude)
  Define the search area.

Static Public Member Functions

static IMPORT_C CPosLmAreaCriteria NewLC (const TReal64 &aSouthLatitude, const TReal64 &aNorthLatitude, const TReal64 &aWestLongitude, const TReal64 &aEastLongitude)
  Two-phased constructor.

Constructor & Destructor Documentation

virtual CPosLmAreaCriteria::~CPosLmAreaCriteria  )  [virtual]
 

Destructor.


Member Function Documentation

IMPORT_C void CPosLmAreaCriteria::GetSearchArea TReal64 &  aSouthLatitude,
TReal64 &  aNorthLatitude,
TReal64 &  aWestLongitude,
TReal64 &  aEastLongitude
const
 

Returns the search area.

Parameters:
[out]  aSouthLatitude  The southern latitude border of the search area.
[out]  aNorthLatitude  The northern latitude border of the search area.
[out]  aWestLongitude  The western longitude border of the search area.
[out]  aEastLongitude  The eastern longitude border of the search area.
static IMPORT_C CPosLmAreaCriteria* CPosLmAreaCriteria::NewLC const TReal64 &  aSouthLatitude,
const TReal64 &  aNorthLatitude,
const TReal64 &  aWestLongitude,
const TReal64 &  aEastLongitude
[static]
 

Two-phased constructor.

The input parameters specify the area to search as described in the class description.

If one of the parameters is out of range, this function fails with error code KErrArgument. The correct ranges are:

  1. -90 =< aSouthLatitude =< aNorthLatitude =< 90
  2. -180 <= aWestLongitude < 180
  3. -180 <= aEastLongitude <= 180
Parameters:
[in]  aSouthLatitude  The southern latitude border of the search area.
[in]  aNorthLatitude  The northern latitude border of the search area.
[in]  aWestLongitude  The western longitude border of the search area.
[in]  aEastLongitude  The eastern longitude border of the search area.
Returns:
A new instance of this class.
IMPORT_C TInt CPosLmAreaCriteria::SetSearchArea const TReal64 &  aSouthLatitude,
const TReal64 &  aNorthLatitude,
const TReal64 &  aWestLongitude,
const TReal64 &  aEastLongitude
 

Define the search area.

The input parameters specify the area to search as described in the class description.

If one of the parameters is out of range, this function fails with error code KErrArgument. The correct ranges are:

  1. -90 =< aSouthLatitude =< aNorthLatitude =< 90
  2. -180 <= aWestLongitude < 180
  3. -180 <= aEastLongitude <= 180
Parameters:
[in]  aSouthLatitude  The southern latitude border of the search area.
[in]  aNorthLatitude  The northern latitude border of the search area.
[in]  aWestLongitude  The western longitude border of the search area.
[in]  aEastLongitude  The eastern longitude border of the search area.
Returns:
KErrNone if successful, KErrArgument if the input parameters are invalid, otherwise a system wide error code.

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top