Revision 37960 trunk/extensions/extGPE-gvSIG/src/org/gvsig/fmap/drivers/gpe/reader/KMLVectorialDriver.java

View differences:

KMLVectorialDriver.java
2 2

  
3 3
import java.util.ArrayList;
4 4

  
5
import org.gvsig.gpe.kml.parser.GPEKml2_1_Parser;
6
import org.gvsig.gpe.kml.parser.GPEKmz2_1_Parser;
5
import org.gvsig.gpe.kml.parser.GPEKml2_2_Parser;
6
import org.gvsig.gpe.kml.parser.GPEKmz2_2_Parser;
7 7

  
8
import com.iver.cit.gvsig.fmap.core.FShape;
9
import com.iver.cit.gvsig.fmap.drivers.WithDefaultLegend;
10
import com.iver.cit.gvsig.fmap.rendering.ILegend;
11
import com.iver.cit.gvsig.fmap.rendering.LegendFactory;
12
import com.iver.cit.gvsig.fmap.rendering.styling.labeling.ILabelingStrategy;
8 13

  
14

  
9 15
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
10 16
 *
11 17
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
......
55 61
/**
56 62
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
57 63
 */
58
public class KMLVectorialDriver extends GPEVectorialDriver{
64
public class KMLVectorialDriver extends GPEVectorialDriver implements WithDefaultLegend {
59 65
	public static final String DRIVERNAME = "gvSIG KML Memory Driver";
66
	private ILegend legend;
67
	private ILabelingStrategy labelingStrategy;
60 68
	
69
	public void setDefaultLegend(ILegend legend) {
70
		this.legend = legend;
71
	}
61 72
	
73
	public void setDefaultLabelingStrategy(ILabelingStrategy labelStrategy) {
74
		this.labelingStrategy = labelStrategy;
75
	}
62 76
	
77
	
78
	
63 79
	/*
64 80
	 * (non-Javadoc)
65 81
	 * @see com.hardcode.driverManager.Driver#getName()
......
74 90
	 */
75 91
	public ArrayList getGPEParsers() {
76 92
		ArrayList parsers = new ArrayList();
77
		parsers.add(GPEKml2_1_Parser.class);
78
		parsers.add(GPEKmz2_1_Parser.class);
93
//		parsers.add(GPEKml2_2_Parser.class);
94
		parsers.add(GPEKmz2_2_Parser.class);
79 95
		return parsers;
80 96
	}
97

  
98
	public ILegend getDefaultLegend() {
99
		if (legend == null) {
100
			legend = LegendFactory.createSingleSymbolLegend(FShape.MULTI);
101
		}
102
		return legend;
103
	}
104

  
105
	public ILabelingStrategy getDefaultLabelingStrategy() {
106
		return labelingStrategy;
107
	}
81 108
}

Also available in: Unified diff