Revision 38898 trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/wms/WMSProtocolHandler.java
WMSProtocolHandler.java | ||
---|---|---|
623 | 623 |
|
624 | 624 |
req.append(onlineResource + symbol + "REQUEST=GetLegendGraphic&SERVICE=WMS&VERSION=").append(getVersion()); |
625 | 625 |
req.append("&LAYER=" + layerName).append("&TRANSPARENT=TRUE").append("&FORMAT=image/png"); |
626 |
return req.toString().replaceAll(" ", "%20"); |
|
626 |
String aux = req.toString().replaceAll(" ", "%20"); |
|
627 |
System.out.println("GetLegendGraphic url:" + aux); |
|
628 |
return aux; |
|
627 | 629 |
} |
628 | 630 |
|
629 | 631 |
/** |
... | ... | |
669 | 671 |
public String getPartialQuery(WMSStatus status) |
670 | 672 |
{ |
671 | 673 |
StringBuffer req = new StringBuffer(); |
672 |
req.append("LAYERS=" + Utilities.Vector2CS(status.getLayerNames())) |
|
673 |
.append("&" + getSRSParameter() + "=" + status.getSrs()) |
|
674 |
.append("&BBOX=" + status.getExtent().getMinX()+ "," ) |
|
675 |
.append(status.getExtent().getMinY()+ ",") |
|
676 |
.append(status.getExtent().getMaxX()+ ",") |
|
677 |
.append(status.getExtent().getMaxY()) |
|
678 |
.append("&WIDTH=" + status.getWidth()) |
|
679 |
.append("&HEIGHT=" + status.getHeight()) |
|
680 |
.append("&FORMAT=" + status.getFormat()) |
|
674 |
req.append("LAYERS=") |
|
675 |
.append(Utilities.Vector2CS(status.getLayerNames())) |
|
676 |
.append("&").append(getSRSParameter()).append("=").append(status.getSrs()); |
|
677 |
|
|
678 |
appendBoundingBox(status, req); |
|
679 |
req.append("&WIDTH=").append(status.getWidth()) |
|
680 |
.append("&HEIGHT=").append(status.getHeight()) |
|
681 |
.append("&FORMAT=").append(status.getFormat()) |
|
681 | 682 |
.append("&STYLES="); |
682 | 683 |
Vector v = status.getStyles(); |
683 | 684 |
if (v!=null && v.size()>0) |
684 | 685 |
req.append(Utilities.Vector2CS(v)); |
685 | 686 |
v = status.getDimensions(); |
686 | 687 |
if (v!=null && v.size()>0) |
687 |
req.append("&" + Utilities.Vector2URLParamString(v));
|
|
688 |
req.append("&").append(Utilities.Vector2URLParamString(v));
|
|
688 | 689 |
if (status.getTransparency()) { |
689 | 690 |
req.append("&TRANSPARENT=TRUE"); |
690 | 691 |
} |
... | ... | |
701 | 702 |
public void close() { |
702 | 703 |
// your code here |
703 | 704 |
} |
705 |
|
|
706 |
protected StringBuffer appendBoundingBox(WMSStatus status, StringBuffer req) { |
|
707 |
req.append("&BBOX=") |
|
708 |
.append(status.getExtent().getMinX()).append(",") |
|
709 |
.append(status.getExtent().getMinY()).append(",") |
|
710 |
.append(status.getExtent().getMaxX()).append(",") |
|
711 |
.append(status.getExtent().getMaxY()); |
|
712 |
return req; |
|
713 |
} |
|
704 | 714 |
|
705 | 715 |
/** |
706 | 716 |
* Inner class that represents the description of the WMS metadata. |
Also available in: Unified diff