Namespaces
Variants
Actions
Revision as of 04:16, 11 October 2012 by hamishwillee (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Get a list of all Landmarks

Jump to: navigation, search


Article Metadata

Tested with
Devices(s): Nokia 5800 XpressMusic

Compatibility
Platform(s): S60 3rd Edition, FP1, FP2
S60 5th Edition

Article
Keywords: XQLandmark
Created: talk2mks (10 Apr 2011)
Last edited: hamishwillee (11 Oct 2012)

Contents

Overview

This code snippets shows how to get list the names of landmarks in the Landmark Database using the Qt Mobile Extension XQLandmark.

Tip.png
Tip: This article and associated mobile extensions has not been superseded in Qt Mobility 1.0.


Preconditions

Install the Qt SDK (recommended when Using Symbian C++ in a Qt project).

Headers required

 #include <XQLandmark>

Source

XQLandmarksManager* landmarkManager = new XQLandmarksManager (this);
 
//Get list of all landmark IDs from the database
QList<int> ids = landmarkManager->landmarkIds();
 
// Go through all the landmark items in the list
for ( int i = 0; i <ids.count(); ++i )
{
XQLandmark landmark = landmarkManager ->landmark(ids.value(i));
qreal latitude = landmark.latitude();
qreal longitude = landmark.longitude();
QString name = landmark.name();
}
97 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved