Revision 19416 branches/v10/extensions/extPublishMapserver/src/org/gvsig/publish/mapserver/model/wms/MapserverWMSLayer.java
MapserverWMSLayer.java | ||
---|---|---|
282 | 282 |
//LAYER |
283 | 283 |
ShpLayer lyr = new ShpLayer(); |
284 | 284 |
lyr.name = getOgcMetadata().getName(); |
285 |
if (mapfile.mapShapePath !=null){
|
|
285 |
if (mapfile.mapShapePath == null){
|
|
286 | 286 |
lyr.data = ifile.getAbsolutePath(); |
287 | 287 |
}else{ |
288 | 288 |
lyr.data = ifile.getFileName(); |
... | ... | |
306 | 306 |
private void generateSingleLegend(ISingleSymbolLegendInfo legend, MapLayer lyr) throws PublishException { |
307 | 307 |
ISymbolInfo isymbol = legend.getSymbolInfo(); |
308 | 308 |
MapClass clase = new MapClass(); |
309 |
//put name |
|
310 |
clase.name = "default"; |
|
309 | 311 |
//put the size units |
310 | 312 |
lyr.sizeunits = isymbol.getUnits(); |
311 | 313 |
|
... | ... | |
412 | 414 |
//if it's an image |
413 | 415 |
File icon = pointSymbol.getImageIconFile(); |
414 | 416 |
if ( icon !=null){ |
415 |
clase.symbol = icon.getName(); |
|
417 |
clase.symbol = icon.getName(); |
|
418 |
Mapserver m = (Mapserver)getService().getServer(); |
|
419 |
String s = m.getMapfileFile().getParentFile().getAbsolutePath(); |
|
420 |
File dst = new File(s+ File.separator+ icon.getName()); |
|
421 |
|
|
422 |
try { |
|
423 |
FileUtils.copy(icon, dst); |
|
424 |
} catch (IOException e) { |
|
425 |
throw new PublishException("cannot_copy_icons"); |
|
426 |
} |
|
416 | 427 |
} |
417 | 428 |
|
418 |
Mapserver m = (Mapserver)getService().getServer(); |
|
419 |
String s = m.getMapfileFile().getParentFile().getAbsolutePath(); |
|
420 |
File dst = new File(s+ File.separator+ icon.getName()); |
|
421 |
|
|
422 |
try { |
|
423 |
FileUtils.copy(icon, dst); |
|
424 |
} catch (IOException e) { |
|
425 |
throw new PublishException("cannot_copy_icons"); |
|
426 |
//e.printStackTrace(); |
|
427 |
} |
|
428 | 429 |
} |
429 | 430 |
/** |
430 | 431 |
* In Mapserver is impossible to have a dashed outline |
... | ... | |
463 | 464 |
mapLayer.metadata.wms_name = getOgcMetadata().getName(); |
464 | 465 |
mapLayer.metadata.wms_title = getOgcMetadata().getTitle(); |
465 | 466 |
mapLayer.metadata.wms_abstract = getOgcMetadata().getAbstract(); |
466 |
Rectangle2D aux = getLayerInfo().getDataSource().getBBox(); |
|
467 |
//Rectangle2D aux = getLayerInfo().getBBox(); |
|
467 |
Rectangle2D aux = getLayerInfo().getDataSource().getNativeBBox(); |
|
468 | 468 |
String bbox = aux.getMinX() + " " + aux.getMinY() + " " + aux.getMaxX() + " " + aux.getMaxY(); |
469 | 469 |
mapLayer.metadata.wms_extent = bbox; |
470 | 470 |
mapLayer.metadata.gml_include_items = "all"; |
Also available in: Unified diff