Handling Landmarks

Handling Landmarks

Landmarks are of prime importance for developing LBS application. Any point with a specific latitude and longitude can act as a landmark. The location API comes with a built-in Landmark class to hold name, description, position and any other relevant info. Applications such as landmark locator (finding hotels, restaurants, petrol pumps etc.), point of interest finder (e.g. your friend’s residence) or routing (route to reach one place from another) use the concept of Landmarks.

Landmark & LandmarkStore

The program LandmarkDistance.java shows an example of using a LandmarkStore. LandmarkStore is a built-in class of the JSR-179 location API. It provides a mean to store, delete or retrieve landmarks, which can be placed under different categories (like ‘hotels’ can be a category, ‘museums’ can be another). There is a default LandmarkStore, however others can be created by an application. This application creates its own store and deletes it at the end. Note: LandmarkStores are not destroyed automatically when an application ends. The stores continue to exist and are shared by all J2ME applications.

Support Issue

The location API has a class by the name AddressInfo, an instance of which can be stored within a Landmark object to keep contact info of the location. But currently Nokia platform doesn’t support it, so in case you need to keep extra info you need to make your own class extending the default Landmark class.