|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.lbs.maps.server.ReverseGeocoder
public final class ReverseGeocoder
Provides reverse geocoding capabilities, so you can request the address for a set of geographical coordinates. You can perform a reverse geocoding request asynchronously or synchronously.
To make an asynchronous call, you must provide a ServerExchangeCallback.
Asynchronous example:
ReverseGeocoder.getInstance().reverseGeocode(myServerExchangeCallback, new MapPoint(), ReverseGeocodeExchange.ADDRESS, -1, 0);
To make a synchronous (or blocking) call, you must pass
null in as the ServerExchangeCallback. This forces
the method to return the results of the query when it's complete.
Synchronous example:
ReverseGeocoder.getInstance().reverseGeocode(null, new MapPoint(), ReverseGeocodeExchange.ADDRESS, -1, 0);
| Method Summary | ||
|---|---|---|
static ReverseGeocoder |
getInstance()
Retrieves the singleton ReverseGeocoder instance. |
|
ReverseGeocodeExchange |
reverseGeocode(ServerExchangeCallback callback,
MapPoint point,
int adminBoundary,
int bearing,
long timeout)
Performs a reverse geocoding request to retrieve the address for a given set of coordinates. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final ReverseGeocoder getInstance()
ReverseGeocoder instance.
ReverseGeocoder.
public final ReverseGeocodeExchange reverseGeocode(ServerExchangeCallback callback,
MapPoint point,
int adminBoundary,
int bearing,
long timeout)
throws ReverseGeocodeException
callback - If provided, this will be an asynchronous call. If null
the call will be blocking (synchronous).point - The location point to reverse geocode. If the point is null an exception will be thrown.adminBoundary - This should be a valid administration from the ReverseGeocodeExchange class.bearing - The bearing the user is facing. Valid values range from 0 - 359. If the value is not valid, it is
ignored.timeout - The amount of time to wait for a connection to be established. For a synchronous call,
it is also the amount of time to wait before the method is unblocked.
ReverseGeocodeExchange that is created for this call, which contains
the reverse geocoding results and any errors.
ReverseGeocodeException - if the point is null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal