Revision 37961 trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/wms/wms_1_3_0/WMSProtocolHandler1_3_0.java
WMSProtocolHandler1_3_0.java | ||
---|---|---|
6 | 6 |
import java.io.IOException; |
7 | 7 |
import java.util.ArrayList; |
8 | 8 |
import java.util.TreeMap; |
9 |
import java.util.Vector; |
|
9 | 10 |
|
10 | 11 |
import org.gvsig.remoteClient.utils.CapabilitiesTags; |
11 | 12 |
import org.gvsig.remoteClient.utils.EncodingXMLParser; |
12 | 13 |
import org.gvsig.remoteClient.utils.ExceptionTags; |
13 | 14 |
import org.gvsig.remoteClient.utils.Utilities; |
15 |
import org.gvsig.remoteClient.wms.WMSLayer; |
|
14 | 16 |
import org.gvsig.remoteClient.wms.WMSStatus; |
15 | 17 |
import org.kxml2.io.KXmlParser; |
16 | 18 |
import org.xmlpull.v1.XmlPullParserException; |
... | ... | |
332 | 334 |
case KXmlParser.START_TAG: |
333 | 335 |
if (parser.getName().compareTo(CapabilitiesTags.FORMAT)==0) |
334 | 336 |
{ |
335 |
//TODO: |
|
336 | 337 |
// add the supported formats by the GetFeatureInfo request |
337 |
//serviceInfo.formats.add(parser.nextText());
|
|
338 |
serviceInfo.infoFormats.add(parser.nextText());
|
|
338 | 339 |
} |
339 | 340 |
else if (parser.getName().compareTo(CapabilitiesTags.DCPTYPE)==0) |
340 | 341 |
{ |
... | ... | |
499 | 500 |
else |
500 | 501 |
onlineResource = status.getOnlineResource(); |
501 | 502 |
symbol = getSymbol(onlineResource); |
503 |
|
|
504 |
String infoFormat = status.getInfoFormat(); // application/vnd.ogc.wms_xml |
|
505 |
|
|
506 |
Vector queryableLayers = new Vector(); |
|
507 |
for (int i=0; i < status.getLayerNames().size(); i++) { |
|
508 |
String layerName = (String) status.getLayerNames().get(i); |
|
509 |
WMSLayer auxLayer = (WMSLayer) this.layers.get(layerName); |
|
510 |
if (auxLayer.isQueryable()) { |
|
511 |
queryableLayers.add(layerName); |
|
512 |
} |
|
513 |
} |
|
514 |
|
|
502 | 515 |
|
503 | 516 |
req.append(onlineResource).append(symbol).append("REQUEST=GetFeatureInfo&SERVICE=WMS&"); |
504 |
req.append("QUERY_LAYERS=").append(Utilities.Vector2CS(status.getLayerNames()));
|
|
505 |
req.append("&VERSION=").append(getVersion()).append("&INFO_FORMAT=application/vnd.ogc.gml&");
|
|
517 |
req.append("QUERY_LAYERS=").append(Utilities.Vector2CS(queryableLayers));
|
|
518 |
req.append("&VERSION=").append(getVersion()).append("&INFO_FORMAT=" + infoFormat + "&");
|
|
506 | 519 |
req.append(getPartialQuery(status)).append("&I="+x + "&J="+y); |
507 | 520 |
req.append("&FEATURE_COUNT=10000"); |
508 | 521 |
if (status.getExceptionFormat() != null) { |
Also available in: Unified diff