Revision 6948 trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/PublishWMSControler.java
PublishWMSControler.java | ||
---|---|---|
3 | 3 |
import java.awt.Color; |
4 | 4 |
import java.awt.geom.Rectangle2D; |
5 | 5 |
|
6 |
import org.gvsig.remoteservices.conf.mapserver.DoMap;
|
|
7 |
import org.gvsig.remoteservices.conf.mapserver.ToMap.CRS;
|
|
8 |
import org.gvsig.remoteservices.conf.mapserver.ToMap.RGB;
|
|
6 |
import org.gvsig.remoteservices.conf.mapserver.MapServer.ConfigFile;
|
|
7 |
import org.gvsig.remoteservices.conf.mapserver.MapServer.CRS;
|
|
8 |
import org.gvsig.remoteservices.conf.mapserver.MapServer.RGB;
|
|
9 | 9 |
|
10 | 10 |
import com.iver.cit.gvsig.publish.gui.MapserverPanel; |
11 | 11 |
|
... | ... | |
67 | 67 |
*/ |
68 | 68 |
|
69 | 69 |
public void publish(String mapFile, String symbolsFile, String fontsFile, String onlineResource, String shapePath ){ |
70 |
DoMap map = new DoMap();
|
|
70 |
ConfigFile map = new ConfigFile();
|
|
71 | 71 |
map.mapName= "TEST_MAPSERVER"; |
72 | 72 |
map.mapStatus="ON"; |
73 | 73 |
map.mapUnits="METERS"; |
... | ... | |
75 | 75 |
map.mapcrs = new CRS(mapCtrl.getMapContext().getViewPort().getProjection().getAbrev(),true); |
76 | 76 |
map.setExtent(-1,-1,1,1); |
77 | 77 |
|
78 |
DoMap.WebMap web = new DoMap.WebMap();
|
|
78 |
ConfigFile.WebMap web = new ConfigFile.WebMap();
|
|
79 | 79 |
web.imagepath="/var/tmp/"; |
80 | 80 |
web.imageurl="/var/tmp/"; |
81 |
web.metadata=new DoMap.MetadataWeb();
|
|
81 |
web.metadata=new ConfigFile.MetadataWeb();
|
|
82 | 82 |
web.metadata.crs= new CRS(mapCtrl.getMapContext().getViewPort().getProjection().getAbrev(),false); |
83 | 83 |
|
84 | 84 |
web.metadata.title="test shape"; |
... | ... | |
88 | 88 |
for (int i= 0; i < layers.getLayersCount(); i++ ){ |
89 | 89 |
FLayer lyr= layers.getLayer(i); |
90 | 90 |
|
91 |
DoMap.ShpLayer capa1 = new DoMap.ShpLayer();
|
|
92 |
DoMap.MapClass clase = new DoMap.MapClass("autopistas");
|
|
91 |
ConfigFile.ShpLayer capa1 = new ConfigFile.ShpLayer();
|
|
92 |
ConfigFile.MapClass clase = new ConfigFile.MapClass("autopistas");
|
|
93 | 93 |
capa1.name = lyr.getName(); |
94 | 94 |
capa1.title = lyr.getName(); |
95 | 95 |
|
... | ... | |
114 | 114 |
if(lyr instanceof FLyrVect){ |
115 | 115 |
FLyrVect lyrvec2 = (FLyrVect) lyr; |
116 | 116 |
Color clr = lyrvec2.getLegend().getDefaultSymbol().getColor(); |
117 |
clase.estilo = new DoMap.StyleMap(
|
|
117 |
clase.estilo = new ConfigFile.StyleMap(
|
|
118 | 118 |
new RGB(clr.getRed(),clr.getGreen(),clr.getBlue()),new RGB(clr.getRed(),clr.getGreen(),clr.getBlue())); |
119 | 119 |
|
120 | 120 |
int alpha = lyrvec2.getLegend().getDefaultSymbol().getColor().getAlpha(); |
... | ... | |
123 | 123 |
}else{ |
124 | 124 |
System.out.println("Esto no es una capa vectorial"); |
125 | 125 |
} |
126 |
capa1.metadata=new DoMap.MetadataLayer();
|
|
126 |
capa1.metadata=new ConfigFile.MetadataLayer();
|
|
127 | 127 |
Rectangle2D extent = null; |
128 | 128 |
try { |
129 | 129 |
extent = lyr.getFullExtent(); |
Also available in: Unified diff