PageRenderTime 13ms CodeModel.GetById 9ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Prototipo/Servlet/src/java/Linea.java

http://prototipomemoria.googlecode.com/
Java | 40 lines | 23 code | 9 blank | 8 comment | 1 complexity | 87bfc97045e5e9c7a4d01bee17027dc2 MD5 | raw file
 1
 2import java.util.ArrayList;
 3
 4/*
 5 * To change this template, choose Tools | Templates
 6 * and open the template in the editor.
 7 */
 8
 9/**
10 *
11 * @author Fran
12 */
13public class Linea implements ElemGeograf {
14
15    private ArrayList<Coordenadas> coord = new ArrayList<Coordenadas>();
16    private String descr;
17
18    public String getDescr()
19    {
20        return descr;
21    }
22
23    public Linea(ArrayList<Coordenadas> unasCoord)
24    {
25        this.coord = unasCoord;
26    }
27
28    public String ToKml(int nivel)
29    {
30        String result = "<Placemark> \n <LineString>\n <coordinates>\n";
31        for (Coordenadas c: coord)
32        {
33            result = result + c.ToKml() + "\n";
34        }
35        result = result + "</coordinates>\n </LineString> \n </Placemark> \n";
36        return result;
37    }
38
39
40}