Package com.javadocmd.simplelatlng

Examples of com.javadocmd.simplelatlng.LatLng


    List<Booking> searchResults = new ArrayList<Booking>();

    Airport departureAirport = airportService.findById(departureAirportId);
    double departureLatitude = departureAirport.getLatitude();
    double departureLongitude = departureAirport.getLongitude();
    LatLng departureLatLong = new LatLng(departureLatitude, departureLongitude);
    Airport arrivalAirport = airportService.findById(arrivalAirportId);
    double arrivalLatitude = arrivalAirport.getLatitude();
    double arrivalLongitude = arrivalAirport.getLongitude();
    LatLng arrivalLatLong = new LatLng(arrivalLatitude, arrivalLongitude);
    double distanceInKilometers = LatLngTool.distance(departureLatLong, arrivalLatLong, LengthUnit.KILOMETER);
    double durationInHours = distanceInKilometers / AVG_SPEED_KM_PER_HOUR;
    double priceUSD = distanceInKilometers * PRICE_USD_PER_KM;
    Calendar departureCalendar = new GregorianCalendar();
    departureCalendar.setTime(departureDate);
View Full Code Here

TOP

Related Classes of com.javadocmd.simplelatlng.LatLng

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.