Sie sind auf Seite 1von 1

public static void main(String[] args) {

DecimalFormat numFormat = new DecimalFormat(".######");


String number = numFormat.format(1343890.563432637);
System.out.println(number);
System.out.println(Double.valueOf(String.format("%.6f", Double.parseDouble
("1343890.563432637"))));
System.out.println("------------------------------------\n\n");
LocationReport report = new LocationReport();
Map<String, String> attributeMap = new HashMap<String, String>();
attributeMap.put("latitude", "30.3023972");
attributeMap.put("longitude", "-97.7619076");
attributeMap.put("altitude", "149");
attributeMap.put("heading", "25");
attributeMap.put("speed", "15");
attributeMap.put("method", "GPS");
attributeMap.put("newFix", "true");
attributeMap.put("fixQuality", "1");
attributeMap.put("accuracy", "09");
attributeMap.put("address", "9442+Capital+of+TX+Hwy%2CAustin%2CTX");
attributeMap.put("addressDate", "20140826174242");
try {
LocationReportAttribute.fillLocationReportObject(report, attributeMap,
new HashMap<String, String>());
System.out.println("latitude = " + report.getLatitude());
System.out.println("longitude = " + report.getLongitude());
System.out.println("altitude = " + report.getAltitude());
System.out.println("heading = " + report.getHeading());
System.out.println("speed = " + report.getSpeed());
System.out.println("method = " + report.getMethod());
System.out.println("newFix = " + report.isNewFix());
System.out.println("fixQuality = " + report.getFixQuality());
System.out.println("accuracy = " + report.getAccuracy());
System.out.println("address = " + report.getAddress());
System.out.println("addressDate = " + report.getAddressDate());
}
catch (Exception ex) {
ex.printStackTrace();
}

Das könnte Ihnen auch gefallen