Revision 3402

View differences:

trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/wms/WMSLayer.java
286 286
public void setParent(WMSLayer1_1_1 parent) {
287 287
	this.parent = parent;
288 288
} 
289

  
290
public String toString()
291
{
292
	return this.getName();
293
}
294

  
289 295
 }
trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/wms/wms_1_1_1/WMSLayer1_1_1.java
35 35
    	String value;
36 36
    	BoundaryBox bbox;
37 37
    	parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.LAYER);
38
    	currentTag = parser.nextTag();
39
    	
38
    	    	
40 39
    	//First of all set whether the layer is Queryable reading the attribute.
41 40
    	value = parser.getAttributeValue("", CapabilitiesTags.QUERYABLE);
42 41
    	if (value != null)
......
47 46
    			setQueryable(true);
48 47
    	}
49 48
    	
49
    	currentTag = parser.nextTag();
50
    	
50 51
    	while (!end) 
51 52
    	{
52 53
			 switch(currentTag)
53 54
			 {
54 55
				case KXmlParser.START_TAG:
55
					/*if (parser.getName().compareTo(CapabilitiesTags.LAYER)==0)
56
					if (parser.getName().compareTo(CapabilitiesTags.LAYER)==0)
56 57
					{	
57 58
						WMSLayer1_1_1 lyr = new WMSLayer1_1_1();						
58
						parser.next(); 
59
						//parser.next(); 
59 60
						lyr.parse(parser);
60 61
						lyr.setParent(this);
61 62
						getChildren().add(lyr);
62 63
					}											
63
					else */if (parser.getName().compareTo(CapabilitiesTags.NAME)==0)
64
					else if (parser.getName().compareTo(CapabilitiesTags.NAME)==0)
64 65
					{		
65 66
						value = parser.nextText();
66 67
						if (value != null) setName(value);						
trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/wms/wms_1_1_1/WMSProtocolHandler1_1_1.java
171 171
					{
172 172
						WMSLayer1_1_1 lyr = new WMSLayer1_1_1();
173 173
						lyr.parse(parser);
174
						if((lyr != null) && (lyr.getName() != null))
175
						{
174
						//if((lyr != null) && (lyr.getName() != null))
175
						//{
176 176
							layers.put(lyr.getName(), lyr); 							
177 177
							//Add all the SRS that the layer supports to the WMSProtocolHandler if they dont exist already
178 178
							for (i=0;i<lyr.getAllSrs().size();i++)
......
182 182
									this.srs.add( lyr.getAllSrs().elementAt(i));
183 183
								}
184 184
							}
185
						}
185
						//}
186 186
						//else
187 187
						//TODO: a layer without title is a parent layer.... not queryable
188 188
					}

Also available in: Unified diff