Advertisement
Guest User

Untitled

a guest
Jan 2nd, 2015
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. public String getAddress(String path) {
  2.         ArrayList<XMLInfo> xmlInfos = readXMLFile(path);
  3.  
  4.         if (!xmlInfos.isEmpty()) {
  5.             String address = "http://maps.google.com/maps?daddr=" + xmlInfos.get(0).getLatitude() + "," + xmlInfos.get(0).getLongitude();
  6.             for (XMLInfo s : xmlInfos) {
  7.                 if (s != null) {
  8.                     address += "+to:" + s.getLatitude() + "," + s.getLongitude();
  9.                 }
  10.             }
  11.             return address;
  12.         }else return "http://maps.google.com";
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement