Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

How to use Landmarks API

From Wiki
Jump to: navigation, search
Article Metadata
Article
Created: eswar_illuri (25 Mar 2008)
Last edited: hamishwillee (25 Jul 2012)

The following code snippets are how to open and read the landmarks from landmarks database

Header required:

#include <epos_cposlandmarkdatabase.h>
#inlcude <epos_CPosLmItemIterator.h>

Library required:

LIBRARY eposlandmarks.lib

Capability required:

Capability LocalServices NetworkServices ReadDeviceData 
Calability ReadUserData WriteDeviceData WriteUserData

Opening Landmarks database

CPosLandmarkDatabase* db = CPosLandmarkDatabase::OpenL();
CleanupStack::PushL(db);
ExecuteAndDeleteLD(db->InitializeL());
CPosLmItemIterator* iter = db->LandmarkIteratorL();
CleanupStack::PushL(iter);
TPosLmItemId lmID;
while ((lmID = iter->NextL()) != KPosLmNullItemId)
{
CPosLandmark* lm = db->ReadLandmarkLC(lmID);
CleanupStack::PopAndDestroy(lm);
}
CleanupStack::PopAndDestroy(2, db);

Reading Landmarks from database

CPosLmCategoryManager* categoryManager = CPosLmCategoryManager::NewL(*aDb);
CleanupStack::PushL(categoryManager);
CPosLmItemIterator* iter = categoryManager->CategoryIteratorL();
CleanupStack::PushL(iter);
TPosLmItemId catID;
while ((catID = iter->NextL()) != KPosLmNullItemId)
{
CPosLandmarkCategory* cat = categoryManager->ReadCategoryLC(catID);
CleanupStack::PopAndDestroy(cat);
}
CleanupStack::PopAndDestroy(2, categoryManager);

Related Links:

This page was last modified on 25 July 2012, at 23:08.
39 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×