Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 08:23, 25 March 2008.

How to use Landmarks API

From Forum Nokia Wiki

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

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);
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX