Sorry about the red box, but we really need you to update your browser. Read this excellent article if you're wondering why we are no longer supporting this browser version. Go to Browse Happy for browser suggestions and how to update.

Open BlackBerry Maps with a local search

You can open BlackBerry Maps to
display points of interest that are nearby the location that you specify in your search
criteria. The search criteria is a String that must
include a business category or a business name, and a location. For example, you can
display all the hotels in the city of Waterloo.

A business category is a type of business, such as coffee, gas, hotels, pizza, and restaurants.

The location is a String that is the name of a village, town, or city, or the latitudinal and longitudinal coordinates, separated by a comma (for example, 4328915,-8032480). The coordinates must be the measurement in decimal degrees with five decimal accuracy
multiplied by 100,000.

Import the required classes.

import net.rim.blackberry.api.invoke.*;

Create a class and a constructor to use to invoke BlackBerry Maps.

public class invokeMaps
{
public invokeMaps()
{
}
}

In the constructor, create an instance of the MapsArguments
class. Pass in the MapsArguments.ARG_LOCAL_SEARCH and String objects to represent the search criteria. The following code sample searches for hotels in Waterloo.