public static boolean writeKMLCoordinates(Writer writer,ArrayList<GeoPoint> coordinates){
  try {
    writer.write("<coordinates>");
    for (    GeoPoint coord : coordinates) {
      writer.write(coord.toInvertedDoubleString());
      writer.write(' ');
    }
    writer.write("</coordinates>\n");
    return true;
  }
 catch (  IOException e) {
    e.printStackTrace();
    return false;
  }
}

public static boolean writeKMLCoordinates ( Writer writer , ArrayList < GeoPoint > coordinates ) { try { writer . write ( "<coordinates>" ) ; for ( GeoPoint coord : coordinates ) { writer . write ( coord . toInvertedDoubleString ( ) ) ; writer . write ( ' ' ) ; } writer . write ( "</coordinates>\n" ) ; return true ; } catch ( IOException e ) { e . printStackTrace ( ) ; return false ; } }
write a list of coordinates in kml format .
