Revision 34305 branches/v2_0_0_prep/libraries/libRemoteServices/src/org/gvsig/remoteclient/wmts/request/WMTSRequest.java
WMTSRequest.java | ||
---|---|---|
33 | 33 |
*/ |
34 | 34 |
package org.gvsig.remoteclient.wmts.request; |
35 | 35 |
|
36 |
import java.util.Vector; |
|
37 |
|
|
36 |
import org.gvsig.remoteclient.RemoteClientStatus; |
|
38 | 37 |
import org.gvsig.remoteclient.ogc.request.OGCRequest; |
39 |
import org.gvsig.remoteclient.utils.Utilities; |
|
40 |
import org.gvsig.remoteclient.wms.WMSStatus; |
|
41 | 38 |
import org.gvsig.remoteclient.wmts.WMTSProtocolHandler; |
42 | 39 |
import org.gvsig.remoteclient.wmts.WMTSStatus; |
43 | 40 |
|
... | ... | |
46 | 43 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
47 | 44 |
*/ |
48 | 45 |
public abstract class WMTSRequest extends OGCRequest { |
49 |
protected WMTSStatus status = null; |
|
50 | 46 |
|
51 |
public WMTSRequest(WMTSStatus status,
|
|
47 |
public WMTSRequest(RemoteClientStatus status,
|
|
52 | 48 |
WMTSProtocolHandler protocolHandler) { |
53 | 49 |
super(status, protocolHandler); |
54 |
this.status = status; |
|
55 | 50 |
} |
56 | 51 |
|
57 | 52 |
/* |
... | ... | |
66 | 61 |
* Gets the part of the OGC request that share GetMap and GetFeatureInfo |
67 | 62 |
* @return String request |
68 | 63 |
*/ |
69 |
@SuppressWarnings("unchecked") |
|
70 |
protected String getPartialQuery(WMSStatus status) |
|
71 |
{ |
|
64 |
protected String getPartialQuery(WMTSStatus status) { |
|
72 | 65 |
StringBuffer req = new StringBuffer(); |
73 |
req.append("LAYERS=" + Utilities.Vector2CS(status.getLayerNames())) |
|
74 |
.append("&SRS=" + status.getSrs()) |
|
75 |
.append("&BBOX=" + status.getExtent().getMinX()+ "," ) |
|
76 |
.append(status.getExtent().getMinY()+ ",") |
|
77 |
.append(status.getExtent().getMaxX()+ ",") |
|
78 |
.append(status.getExtent().getMaxY()) |
|
79 |
.append("&WIDTH=" + status.getWidth()) |
|
80 |
.append("&HEIGHT=" + status.getHeight()) |
|
81 |
.append("&FORMAT=" + status.getFormat()) |
|
82 |
.append("&STYLES="); |
|
83 |
Vector v = status.getStyles(); |
|
84 |
if (v!=null && v.size()>0) |
|
85 |
req.append(Utilities.Vector2CS(v)); |
|
86 |
v = status.getDimensions(); |
|
87 |
if (v!=null && v.size()>0) |
|
88 |
req.append("&" + Utilities.Vector2URLParamString(v)); |
|
89 |
if (status.getTransparency()) { |
|
90 |
req.append("&TRANSPARENT=TRUE"); |
|
91 |
} |
|
66 |
req.append("Layer=" + status.getLayer()) |
|
67 |
.append("&Style=" + status.getStyle()) |
|
68 |
.append("&Format=" + status.getFormat()) |
|
69 |
.append("&TileMatrixSet=" + status.getTileMatrixSet()) |
|
70 |
.append("&TileMatrix=" + status.getTileMatrix()) |
|
71 |
.append("&TileRow=" + status. getTileRow()) |
|
72 |
.append("&TileCol=" + status.getTileCol()); |
|
92 | 73 |
return req.toString(); |
93 | 74 |
} |
94 | 75 |
|
Also available in: Unified diff