×
Namespaces

Variants
Actions

How to use Landmarks API

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: eswar_illuri (25 Mar 2008)
Last edited: hamishwillee (26 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 26 July 2012, at 02:08.
41 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.

×