Storing location information on a mobile device

Location information may be stored in database entries called landmarks, which contain at least a name and a location.

Typical use cases include:

  • Sending stored location information to another device which is stored according to the WGS84 standard.

  • finding sites within a set distance of a stored point

Note: The S60 3rd Edition, S60 3rd Edition Feature Pack 1, and S60 3rd Edition Feature Pack 2 SDKs do not have a Map API. You need to have a third party API to display the location information you receive on a map.

Saving location information on a mobile device

To store location information on your mobile device:

  1. Make use of the methods of the Landmarks API when constructing your application.

    The CPosLandmarkDatabase class is used for accessing the database with the landmarks information and the CPosLandmark class contains the location information.

    For detailed information on how to do this, see:

    • Using landmarks database for a discussion of how to start accessing the database with the location information, including a structure diagram.

    • Managing landmarks for code samples of opening, editing, and adding location information to a database

    • Listening to database events for possible events type passed to your application and code samples for implementing a listener

      The TPosLmEvent class is used in listening for events.

  2. Make sure eposlandmarks.lib 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.

  3. Make sure you have the correct capabilities information set for your application, depending on your application you may need LocalServices, NetworkServices, ReadDeviceData, ReadUserData, WriteDeviceData, and WriteUserData.

Additional information on storing location information

For more information see,

  • API description for a description of the API and its class structure.

  • Using the Landmarks API for a general overview on how to create applications using the API.

  • for a reference example on searching and manipulating the information in the location database, see the LocationLandmarksRefAppForS60 in the SDK at < SDK installation directory>\S60Ex\LocationLandmarksRefAppForS60.

  • for a reference example on how to use common UI components to work with landmark data, see the LocationLandmarksUIRefApp in the SDK at < SDK installation directory>\S60Ex\LocationLandmarksUIRefApp.

Related S60 APIs

The S60 platform also offers the following related APIs: