Symbian3/SDK/Source/GUID-DF756D6C-1E03-4EC0-B074-09611D122359.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 13 Aug 2010 16:47:46 +0100
changeset 14 578be2adaf3e
parent 13 48780e181b38
permissions -rw-r--r--
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582

<?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/></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 <xref format="html" href="specs/guides/Landmarks_API_Specification/Landmarks_API_Specification.html" scope="external">Landmarks API</xref>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><xref format="html" href="specs/guides/Landmarks_API_Specification/Landmarks_API_Specification.html#Landmarks_API_Specification.topicUsingDb" scope="external">Using landmarks database</xref> for a discussion of how to start
accessing the database with the location information, including a
structure diagram.</p></li>
<li><p><xref format="html" href="specs/guides/Landmarks_API_Specification/Landmarks_API_Specification.html#Landmarks_API_Specification.topicReadLandmarks" scope="external">Managing landmarks</xref> for code samples of opening, editing,
and adding location information to a database</p></li>
<li><p><xref format="html" href="specs/guides/Landmarks_API_Specification/Landmarks_API_Specification.html#Landmarks_API_Specification.topicListenEvents" scope="external">Listening to database events</xref> for possible events type passed
to your application and code samples for implementing a listener</p>
<itemgroup>
<p>The <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/structTPosLmEvent.html" format="application/java-archive">TPosLmEvent</xref> 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><xref format="html" href="specs/guides/Landmarks_API_Specification/Landmarks_API_Specification.html#Landmarks_API_Specification.topic2" scope="external">API description</xref> for a description of the API and its class
structure</p></li>
<li><p><xref format="html" href="specs/guides/Landmarks_API_Specification/Landmarks_API_Specification.html" scope="external">Using the Landmarks API</xref> 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><xref format="html" href="specs/guides/Landmarks_API_Specification/Landmarks_API_Specification.html" scope="external">Landmarks API</xref> for accessing the database</p></li>
<li><p><xref format="html" href="specs/guides/Landmarks_Database_Management_API_Specification/Landmarks_Database_Management_API_Specification.html" scope="external">Landmarks Database Management API</xref> for creating and deleting
databases</p></li>
<li><p><xref format="html" href="specs/guides/Landmarks_Search_API_Specification/Landmarks_Search_API_Specification.html" scope="external">Landmarks Search API</xref> for allowing mobile devices users
to search the database</p></li>
<li><p><xref format="html" href="specs/guides/Landmarks_UI_Add_Edit_API_Specification/Landmarks_UI_Add_Edit_API_Specification.html" scope="external">Landmarks UI Add/Edit API</xref> for allowing mobile device users
to add and edit landmarks</p></li>
<li><p><xref format="html" href="specs/guides/Landmarks_UI_Selector_API_Specification/Landmarks_UI_Selector_API_Specification.html" scope="external">Landmarks UI Selector API</xref> 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>