CMnGeocoder Class Reference
class CMnGeocoder : public CBase |
Both geocoding (address to coordinate) and "reverse geocoding" (coordinate to address) features are provided by this class. Further in documentation they are all referred to as "geocoding" if not specified otherwise.
Geocoding operations are asynchronous, they can be cancelled by Cancel() . However only one asynchronous request can be issued at a time, otherwise client will be panicked with KMnPanicDuplicateRequest.
To create an instance of the class, use NewL or NewChainedL methods. They require an instance of CMnProvider, defined in Map and Navigation Provider Discovery API.
Main methods are FindCoordinateByAddressL (two overloads) and FindAddressByCoordinateL . Other methods define optional information that changes behavior of the class and others help to retrieve results of main methods' execution.
- Since
- 3.1 mnclientlib.dll
Constructor & Destructor Documentation
Member Functions Documentation
ConstructChainedL(CMnProvider &)
ConstructCommonL(CMnProvider &)
ConstructNewL(CMnProvider &)
FindAddressByCoordinateL(const CPosLandmark &, TRequestStatus &)
Coordinate information from passed landmark will be used. Any other helper information (like coverage radius, existing address information) can also be used. If it is not desired, then this information should be removed from landmark by client.
Only one address will be the result of this operation. If any ambiguities arise during translation, then Provider Application may query user to solve it. Set EOptionDialogDisabled to prevent this. Additional information (other than coordinate) found in landmark cannot be a reason for such a request.
Use RetrieveGeocodingResultL() to retrieve results of the operation.
This method can leave in case of memory lack or other system error. If it leaves, no asynchronous request is outstanding.
-
panic
- "MnClientPanic"-KMnPanicDuplicateRequest New asynchronous request is issued before previous one is completed.
Parameters
const CPosLandmark & aLandmark | Landmark containing address information |
TRequestStatus & aRequest | Contains result of the request, when it is completed. KErrNotFound if given address couldn't be resolved to coordinate (also due to disabling of query dialog). KErrCancel, if user has cancelled the operation. KErrArgument, if input landmark does not contain coordinate information (latitude and longitude are required). KErrNone if request is completed successfully. |
FindCoordinateByAddressL(const CPosLandmark &, TRequestStatus &)
Address information from passed landmark will be used.
Only one coordinate will be the result of this operation. If any ambiguities arise during translation, then Provider Application may query the user to solve it. Set EOptionDialogDisabled to prevent this.
Use RetrieveGeocodingResultL() to retrieve results of the operation.
This method can leave in case of memory lack or other system error. If it leaves, no asynchronous request is outstanding.
-
panic
- "MnClientPanic"-KMnPanicDuplicateRequest New asynchronous request is issued before previous one is completed.
Parameters
const CPosLandmark & aLandmark | Landmark containing address information |
TRequestStatus & aRequest | Contains result of the request, when it is completed. KErrNotFound if given address couldn't be resolved to coordinate (also due to disabling of query dialog). KErrCancel, if user has cancelled the operation. KErrArgument, if input landmark does not contain address information. KErrNone if request is completed successfully. |
FindCoordinateByAddressL(const TDesC &, TRequestStatus &)
This is the another overload, which accepts address input as plain string.
Only one coordinate will be the result of this operation. If any ambiguities arise during translation, then Provider Application may query the user to solve it. Set EOptionDialogDisabled to prevent this.
Use RetrieveGeocodingResultL() to retrieve results of the operation.
This method can leave in case of memory lack or other system error. If it leaves, no asynchronous request is outstanding.
-
panic
- "MnClientPanic"-KMnPanicDuplicateRequest New asynchronous request is issued before previous one is completed.
Parameters
const TDesC & aAddress | Plain address. Format of this string is not defined, this is barely how human user writes addresses down. |
TRequestStatus & aRequest | Contains result of the request, when it is completed. KErrNotFound if given address couldn't be resolved to coordinate (also due to disabling of query dialog). KErrCancel, if user has cancelled the operation. KErrNone if request is completed successfully. |
NewChainedL(CMnProvider &)
Parameters
CMnProvider & aProvider | Provider Application to be used for geocoding. |
NewL(CMnProvider &)
Parameters
CMnProvider & aProvider | Provider Application to be used for geocoding. |
RemoveExitObserver()
IMPORT_C void | RemoveExitObserver | ( | ) | |
RetrieveGeocodingResultL(CPosLandmark &)
IMPORT_C void | RetrieveGeocodingResultL | ( | CPosLandmark & | aTargetLandmark | ) | |
If last operation result was address then address information in the passed landmark is updated. If last operation result were coordinates, then coordinate information of the landmark is updated. Note that landmark is not stored in any database, client has to do it itself if needed.
Target landmark parameter does not have to be a different landmark then that was passed for geocoding or reverse geocoding. However, all address or coordinate (depending on last operation result type) information will be updated in target landmark.
Issuing next geocoding request discards current result.
-
leave
- KErrNotFound Result is not available.
Parameters
CPosLandmark & aTargetLandmark | This landmark will be updated according to last operation result. |
SetExitObserverL(MAknServerAppExitObserver &)
-
leave
- KErrAlreadyExists if observer is already set.
SetOptions(TOptions)
IMPORT_C void | SetOptions | ( | TOptions | aOptions | ) | |
Parameters
TOptions aOptions | Bitmap of TOption values. |
Member Enumerations Documentation
Enum TOption
Enumerators
EOptionNone = 0x00 |
Default value
|
EOptionDialogDisabled = 0x01 |
Defines that no queries to user are allowed during geocoding operations
|
Member Type Definitions Documentation
Member Data Documentation
CApaServerAppExitMonitor * iExitMonitor
CApaServerAppExitMonitor * | iExitMonitor | [private] |
RMnGeocodingServiceClient * iSession
RMnGeocodingServiceClient * | iSession | [private] |
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.