Package com.apress.progwt.client.domain

Examples of com.apress.progwt.client.domain.HasAddress


    }

    @Override
    public void run() {

        final HasAddress school = schools.remove(0);
        if (school == null) {
            Log.debug("Finished");
            cancel();
            return;
        }
        final String full = school.getFullAddress();
        Geocoder geocoder = new Geocoder();
        geocoder.getLatLng("1600 pennsylvania avenue, washington dc",
                new LatLngCallback() {
                    public void onFailure() {
                    }

                    public void onSuccess(LatLng point) {
                    }
                });

        geocoder.getLatLng(full, new LatLngCallback() {
            public void onFailure() {
                Log
                        .debug("UPDATE "
                                + tablename
                                + " SET latitude = '-1',longitude  = '-1' WHERE id ="
                                + school.getId() + " LIMIT 1 ;");
                run();
            }

            public void onSuccess(LatLng point) {

                Log.debug("UPDATE " + tablename + " SET latitude = '"
                        + point.getLatitude() + "',longitude  = '"
                        + point.getLongitude() + "' WHERE id ="
                        + school.getId() + " LIMIT 1 ;");
                run();
            }
        });
    }
View Full Code Here

TOP

Related Classes of com.apress.progwt.client.domain.HasAddress

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.