Revision 7659 trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/servers/mapserver/MapServerLayerFactory.java
MapServerLayerFactory.java | ||
---|---|---|
15 | 15 |
|
16 | 16 |
import com.iver.cit.gvsig.fmap.DriverException; |
17 | 17 |
import com.iver.cit.gvsig.fmap.core.FShape; |
18 |
import com.iver.cit.gvsig.fmap.core.ISymbol; |
|
18 | 19 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
19 | 20 |
import com.iver.cit.gvsig.fmap.drivers.DBLayerDefinition; |
20 | 21 |
import com.iver.cit.gvsig.fmap.drivers.raster.CmsRasterDriver; |
... | ... | |
76 | 77 |
* |
77 | 78 |
* $Id$ |
78 | 79 |
* $Log$ |
79 |
* Revision 1.7 2006-09-19 00:30:31 luisw2 |
|
80 |
* Revision 1.8 2006-09-28 15:04:02 fjp |
|
81 |
* Usar siempre que se pueda ISymbol en lugar de FSymbol |
|
82 |
* |
|
83 |
* Revision 1.7 2006/09/19 00:30:31 luisw2 |
|
80 | 84 |
* Soporte para WCS en mapserver. Pendiente de verificar que va |
81 | 85 |
* |
82 | 86 |
* Revision 1.6 2006/09/13 11:33:37 jorpiell |
... | ... | |
177 | 181 |
mLayer.classList = getMapClassList(lyrVect); |
178 | 182 |
mLayer.metadata = new ConfigFile.MetadataLayer(); |
179 | 183 |
try{ |
180 |
mLayer.transparency = 255 - lyrVect.getLegend().getDefaultSymbol().getColor().getAlpha(); |
|
184 |
FSymbol sym = (FSymbol) lyrVect.getLegend().getDefaultSymbol(); |
|
185 |
mLayer.transparency = 255 - sym.getColor().getAlpha(); |
|
181 | 186 |
}catch(NullPointerException e){ |
182 | 187 |
|
183 | 188 |
} |
... | ... | |
281 | 286 |
Legend legend = lyrVect.getLegend(); |
282 | 287 |
if (legend instanceof SingleSymbolLegend){ |
283 | 288 |
MapClass mapClass = new MapClass(getLayerName(lyrVect.getName())); |
284 |
Color clr = legend.getDefaultSymbol().getColor(); |
|
285 |
Color outLineclr = legend.getDefaultSymbol().getOutlineColor(); |
|
289 |
FSymbol sym = (FSymbol) legend.getDefaultSymbol(); |
|
290 |
Color clr = sym.getColor(); |
|
291 |
Color outLineclr = sym.getOutlineColor(); |
|
286 | 292 |
mapClass.estilo = new ConfigFile.StyleMap(clr,outLineclr); |
287 | 293 |
try{ |
288 |
mapClass.size = new Float(((BasicStroke)legend.getDefaultSymbol().getStroke()).getLineWidth()).intValue();
|
|
294 |
mapClass.size = new Float(((BasicStroke)sym.getStroke()).getLineWidth()).intValue();
|
|
289 | 295 |
}catch(Exception e){ |
290 | 296 |
|
291 | 297 |
} |
292 | 298 |
mapClasses.add(mapClass); |
293 | 299 |
}else if(legend instanceof VectorialUniqueValueLegend){ |
294 | 300 |
VectorialUniqueValueLegend uniqueValueLegend = (VectorialUniqueValueLegend)legend; |
295 |
FSymbol[] symbols = uniqueValueLegend.getSymbols();
|
|
301 |
ISymbol[] symbols = uniqueValueLegend.getSymbols();
|
|
296 | 302 |
for (int i=0 ; i<symbols.length ; i++){ |
297 | 303 |
MapClass mapClass = new MapClass(symbols[i].getDescription()); |
298 |
Color clr = symbols[i].getColor(); |
|
299 |
Color outLineclr = symbols[i].getOutlineColor(); |
|
304 |
FSymbol auxSym = (FSymbol) symbols[i]; |
|
305 |
Color clr = auxSym.getColor(); |
|
306 |
Color outLineclr = auxSym.getOutlineColor(); |
|
300 | 307 |
mapClass.estilo = new ConfigFile.StyleMap(clr,outLineclr); |
301 | 308 |
mapClass.expression = "('[" + uniqueValueLegend.getFieldName() + "]' = '" + |
302 | 309 |
symbols[i].getDescription() + "')"; |
303 | 310 |
try{ |
304 |
mapClass.size = new Float(((BasicStroke)symbols[i].getStroke()).getLineWidth()).intValue();
|
|
311 |
mapClass.size = new Float(((BasicStroke)auxSym.getStroke()).getLineWidth()).intValue();
|
|
305 | 312 |
}catch(Exception e){ |
306 | 313 |
|
307 | 314 |
} |
... | ... | |
310 | 317 |
|
311 | 318 |
}else if(legend instanceof VectorialIntervalLegend){ |
312 | 319 |
MapClass mapClass = new MapClass(getLayerName(lyrVect.getName())); |
313 |
Color clr = legend.getDefaultSymbol().getColor(); |
|
314 |
Color outLineclr = legend.getDefaultSymbol().getOutlineColor(); |
|
320 |
|
|
321 |
FSymbol sym = (FSymbol) legend.getDefaultSymbol(); |
|
322 |
Color clr = sym.getColor(); |
|
323 |
Color outLineclr = sym.getOutlineColor(); |
|
315 | 324 |
mapClass.estilo = new ConfigFile.StyleMap(clr,outLineclr); |
316 | 325 |
try{ |
317 |
mapClass.size = new Float(((BasicStroke)legend.getDefaultSymbol().getStroke()).getLineWidth()).intValue();
|
|
326 |
mapClass.size = new Float(((BasicStroke)sym.getStroke()).getLineWidth()).intValue();
|
|
318 | 327 |
}catch(Exception e){ |
319 | 328 |
|
320 | 329 |
} |
Also available in: Unified diff