Package net.rim.device.api.lbs.maps.server.exchange

Examples of net.rim.device.api.lbs.maps.server.exchange.ReverseGeocodeExchange


                                    // a request to the server. Passing null as
                                    // the
                                    // first argument to reverseGeocode()
                                    // results in
                                    // a blocking call.
                                    final ReverseGeocodeExchange ex =
                                            reverseGeocoder
                                                    .reverseGeocode(
                                                            null,
                                                            origin,
                                                            choice.getValue(),
                                                            Integer.parseInt(_bearingEditField
                                                                    .getText()),
                                                            0);

                                    UiApplication.getUiApplication()
                                            .invokeLater(new Runnable() {
                                                /**
                                                 * @see java.lang.Runnable#run()
                                                 */
                                                public void run() {
                                                    _resultsField
                                                            .setText("Blocking method");
                                                }
                                            });

                                    // In this case we did not provide a
                                    // callback so we need to initiate
                                    // the processing of the reverse geocoding
                                    // result ourselves.
                                    if (ex.getExceptionList().size() == 0) {
                                        requestSuccess(ex);
                                    } else {
                                        requestFailure(ex);
                                    }
                                } catch (final ReverseGeocodeException rge) {
View Full Code Here


     */
    public void requestSuccess(final ServerExchange exchange) {
        // Display results in the event of a successful request.

        if (exchange instanceof ReverseGeocodeExchange) {
            final ReverseGeocodeExchange reverseGeocodeExchange =
                    (ReverseGeocodeExchange) exchange;
            final Vector results = reverseGeocodeExchange.getResults();

            final StringBuffer text = new StringBuffer();

            for (int i = 0; i < results.size(); i++) {
                text.append(GeocodeDemo.composeLocation((MapLocation) results
View Full Code Here

TOP

Related Classes of net.rim.device.api.lbs.maps.server.exchange.ReverseGeocodeExchange

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.