Symbian3/SDK/Source/GUID-DF756D6C-1E03-4EC0-B074-09611D122359.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
	Nokia Corporation - initial contribution.
Contributors: 
-->  <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"><concept id="GUID-DF756D6C-1E03-4EC0-B074-09611D122359" xml:lang="en"><title>Storing
location information on a mobile device</title><prolog><metadata><keywords></keywords></metadata></prolog><conbody>
<p><xref href="GUID-BC8D1F02-3FBB-406A-80CE-5836E61EBD82.dita">Location information</xref> may
be stored as database entries called <i>landmarks</i> that contain at least
a name and a location.</p>
<p>Typical use cases include:</p>
<ul>
<li><p>Sending location information that is stored according to
the World Geodetic System (WGS 84) to another device.</p></li>
<li><p>Finding sites within a set distance of a stored point.</p>
</li>
</ul>
<note>
<p>The SDK does not include a map API, and therefore you must use a third
party API to display the location information you receive on a map. <draft-comment time="2009-04-21T13:48">Does this also apply to S60 5th Edition?</draft-comment></p>
</note>
<section id="GUID-10327A77-B899-4F7F-9F12-094855387BAB"><title>Saving location
information on a mobile device</title>
<p>To store location information on your mobile device:</p>
<ol>
<li id="GUID-820AF19E-FD11-46E6-A865-6CFF62AD5508"><p>Make use of
the methods of the Landmarks API when constructing
your application.</p>
<itemgroup>
<p>The <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCPosLandmarkDatabase.html" format="application/java-archive"><codeph>CPosLandmarkDatabase</codeph></xref> class is used for accessing the database with the landmarks
information and the <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCPosLandmark.html" format="application/java-archive"><codeph>CPosLandmark</codeph></xref> class
contains the location information.</p>
<p>For detailed information on how to do this, see:</p>
<ul>
<li><p>Using landmarks database for
a discussion of how to start accessing the database with the location information,
including a structure diagram.</p></li>
<li><p>Managing landmarks for
code samples of opening, editing, and adding location information to a database</p>
</li>
<li><p>Listening to database events for
possible events type passed to your application and code samples for implementing
a listener</p>
<itemgroup>
<p>The TPosLmEvent class
is used in listening for events.</p>
</itemgroup>
</li>
</ul>
</itemgroup>
</li>
<li id="GUID-8B69F55D-48B1-469B-83CA-31F0353DCBF0"><p>Make sure <codeph>eposlandmarks.lib</codeph> is
accessible to your linker when compiling your application by including it
in your .mmp file or by editing the project properties in your IDE, depending
on your build environment.</p></li>
<li id="GUID-09A43DDB-5BA1-470D-B5A3-5084D2BA124A"><p>Make sure
you have the correct capabilities information set for your application, depending
on your application you may need <codeph>LocalServices</codeph>, <codeph>NetworkServices</codeph>, <codeph>ReadDeviceData</codeph>, <codeph>ReadUserData</codeph>, <codeph>WriteDeviceData</codeph>, and <codeph>WriteUserData</codeph>.</p>
</li>
</ol>
</section>
<section id="GUID-8D41C21E-0334-4679-B4D2-709B96C34076"><title>Additional information
on storing location information</title>
<p>For more information see, <draft-comment time="2007-10-01T13:49">Question
for the reviewers: Is there anything else that we could add here?</draft-comment></p>
<ul>
<li><p>API description for a description
of the API and its class structure</p></li>
<li><p>Using the Landmarks API for a
general overview on how to create applications using the API</p></li>
<li><p>For a reference example on searching and manipulating the
information in the location database, see <codeph>LocationLandmarksRefAppForS60</codeph> in
the SDK (<codeph>&lt;SDK installation directory&gt;\S60CppExamples\</codeph>)</p>
</li>
<li><p>For a reference example on how to use common UI components
to work with landmark data, see <codeph>LocationLandmarksUIRefApp</codeph> in
the SDK (<codeph>&lt;SDK installation directory&gt;\S60CppExamples\AutoAdaptedToTouchEx\</codeph>)</p>
</li>
</ul>
</section>
<section id="GUID-987E85BE-B14B-4248-853F-F7BC5EF48BE7"><title>Related Symbian
APIs</title>
<p>The Symbian platform also offers the following related
APIs:</p>
<ul>
<li><p>Landmarks API for accessing
the database</p></li>
<li><p>Landmarks Database
Management API for creating and deleting databases</p></li>
<li><p>Landmarks Search API for
allowing mobile devices users to search the database</p></li>
<li><p>Landmarks UI Add/Edit API for
allowing mobile device users to add and edit landmarks</p></li>
<li><p>Landmarks UI Selector API for
displaying and selecting landmarks</p></li>
<li><p>Location Acquisition API for
finding the location of a mobile device</p></li>
<li><p><xref href="GUID-02EE9C85-5942-40F7-BF60-B5D8B04B9AA6.dita#GUID-02EE9C85-5942-40F7-BF60-B5D8B04B9AA6/GUID-15C32932-3088-4FC9-BE83-2EC00FCEB694">Communication</xref> for
sending location information to other devices</p></li>
</ul>
</section>
</conbody></concept>