/** *

* This class represents a single data point for a given contact. Specifically, it * is used to generate the Javascript code representing a GLatLng object for use * with the Google Maps API. *

* @author Mark Woehrer; edited by Wayne Smith, 4/2009 * @version 1a5 */ public class LatLng { double latitude; double longitude; public double getLatitude() { return latitude; } public void setLatitude(double latitude) { this.latitude = latitude; } public double getLongitude() { return longitude; } public void setLongitude(double longitude) { this.longitude = longitude; } public LatLng(double latitude, double longitude) { super(); this.latitude = latitude; this.longitude = longitude; } /** * Generate a comma separated latitude / longitude pair. *

* @return A String suitable for use with Javascript */ public String toString() { return latitude + ", " + longitude; } /** * This is the test method for the class. * @param args */ public static void main(String[] args) { // Create a new LatLng object LatLng latlng = new LatLng(1,2); // Test the toString() method System.out.println(latlng); } }