root / import / ext3D / trunk / ext3D / src / com / iver / ai2 / gvsig3d / map3d / MapContext3D.java @ 14901
History | View | Annotate | Download (1.37 KB)
1 |
package com.iver.ai2.gvsig3d.map3d; |
---|---|
2 |
|
3 |
import com.iver.ai2.gvsig3d.map3d.layers.FLayers3D; |
4 |
import com.iver.cit.gvsig.fmap.MapContext; |
5 |
import com.iver.cit.gvsig.fmap.ViewPort; |
6 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
7 |
import com.iver.cit.gvsig.fmap.layers.XMLException; |
8 |
import com.iver.utiles.XMLEntity; |
9 |
|
10 |
public class MapContext3D extends MapContext { |
11 |
|
12 |
public MapContext3D(ViewPort vp) {
|
13 |
super(vp);
|
14 |
// TODO Auto-generated constructor stub
|
15 |
} |
16 |
|
17 |
public MapContext3D(FLayers fLayers, ViewPort vp) {
|
18 |
super(fLayers, vp);
|
19 |
// TODO Auto-generated constructor stub
|
20 |
} |
21 |
|
22 |
/**
|
23 |
* Crea un nuevo MapContext(3D) a partir del XMLEntity.
|
24 |
*
|
25 |
* @param xml
|
26 |
* XMLEntity
|
27 |
*
|
28 |
* @return Nuevo MapContext3D.
|
29 |
*
|
30 |
* @throws XMLException
|
31 |
*/
|
32 |
public static MapContext createFromXML(XMLEntity xml) throws XMLException { |
33 |
ViewPort vp = ViewPort.createFromXML(xml.getChild(0));
|
34 |
|
35 |
FLayers layers = new FLayers3D(null, null, vp); |
36 |
layers.setXMLEntity(xml.getChild(1));
|
37 |
|
38 |
MapContext fmap = layers.getMapContext(); |
39 |
|
40 |
return fmap;
|
41 |
} |
42 |
|
43 |
public static MapContext createFromXML03(XMLEntity xml) throws XMLException { |
44 |
ViewPort vp = ViewPort.createFromXML03(xml.getChild(0));
|
45 |
|
46 |
FLayers layers = new FLayers3D(null, null, vp); |
47 |
layers.setXMLEntity03(xml.getChild(1));
|
48 |
|
49 |
MapContext fmap = layers.getMapContext(); |
50 |
|
51 |
return fmap;
|
52 |
} |
53 |
|
54 |
} |