Package org.opentripplanner.geocoder

Examples of org.opentripplanner.geocoder.Geocoder


    public void testGeocodeValidAddress() {
        final double lat = 78.121;
        final double lng = -43.237;
        final String description = "121 elm street";
       
        geocoderServer.geocoder = new Geocoder() {
            @Override
            public GeocoderResults geocode(String address, Envelope bbox) {
                GeocoderResult result = new GeocoderResult(lat, lng, description);
                return new GeocoderResults(Arrays.asList(result));
            }
View Full Code Here


    }
   
    @Test
    public void testGeocodeInvalidAddress() {
        final String error = "uh oh";
        geocoderServer.geocoder = new Geocoder() {
            @Override
            public GeocoderResults geocode(String address, Envelope bbox) {
                return new GeocoderResults(error);
            }
        };
View Full Code Here

TOP

Related Classes of org.opentripplanner.geocoder.Geocoder

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.