This example MIDlet shows you how to create a location-aware city guide that lists the most notable tourist attractions nearby and shows detailed information about them. The user can browse tourist attractions, read about them, and view them on a map. The MIDlet uses the Location API to determine the user's current location and the Nokia Maps API to implement the map functionality.
This example demonstrates how to:
Display a map using the Nokia Maps API
Display the user's current location on the map
Retrieve purchased content from a back-end server
Implement scrollable views using the Gesture API and Frame Animator API
Figure: TouristAttractions MIDlet running on a Series 40 full touch device
For a tutorial that shows you how to create this MIDlet, see section Example: Creating a location-aware city guide MIDlet.
This MIDlet is provided in two versions:
The regular version is compatible with Series 40 3rd Edition Feature Pack 1 devices and newer.
The Series 40 full touch version is compatible with Series 40 3rd Edition Feature Pack 1 devices and newer, but the Series 40 full touch features are only available on Series 40 full touch devices with Java Runtime 2.0.0 for Series 40 or newer.
Note: The device screen must be 240 pixels wide or wider.
This MIDlet has been tested on the following devices:
Nokia Asha 201 on Nokia Asha software platform (Java Runtime 1.1.0 for Series 40)
Nokia Asha 303 on Nokia Asha software platform (Java Runtime 1.1.0 for Series 40)
Nokia Asha 311 on Nokia Asha software platform (Java Runtime 2.0.0 for Series 40)
Nokia X3-02 (Series 40 6th Edition Feature Pack 1)
The MIDlet project files are packaged as a zip file. The zip file includes two projects: the regular version and the Series 40 full touch version. To download the zip file, click the following link:
For possible newer version, other updates or additional documentation, check the TouristAttractions at Nokia Developer Projects.
The MIDlet consists of the following packages and classes (click to view the full source code):
Note: The source code is from the Series 40 full touch version of the MIDlet. To view the source code of the regular version, see the source code files in the zip file.
com.nokia.example.attractions
com.nokia.example.attractions.location
com.nokia.example.attractions.map
com.nokia.example.attractions.models
com.nokia.example.attractions.network
com.nokia.example.attractions.utils
com.nokia.example.attractions.views
com.nokia.example.attractions.views.list