Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] patch to suppress "all on" WMS layers


This is the way Paul suggested, suppress the "all on" layer. I would prefer to symbolize layers by type, using either a tree view, or by color, but that will have to wait.

diff -ur --exclude=.svn --exclude=.classpath udig-master/trunk/plugins/net.refractions.udig.catalog.wms/src/net/refractions/udig/catalog/internal/wms/WMSServiceImpl.java udig/trunk/plugins/net.refractions.udig.catalog.wms/src/net/refractions/udig/catalog/internal/wms/WMSServiceImpl.java
--- udig-master/trunk/plugins/net.refractions.udig.catalog.wms/src/net/refractions/udig/catalog/internal/wms/WMSServiceImpl.java	2005-06-02 20:02:46.000000000 -0400
+++ udig/trunk/plugins/net.refractions.udig.catalog.wms/src/net/refractions/udig/catalog/internal/wms/WMSServiceImpl.java	2005-06-25 12:04:03.000000000 -0400
@@ -213,8 +213,13 @@
                      */
                     if (layers != null) {
                         for( int i = 0; i < layers.length; i++ ) {
-                            Layer layer = layers[i];
-                            members.add(new WMSGeoResourceImpl(this, layer));
+							/* suppress layers that have children
+							 * should add hasChildren() to geotools?
+							 */
+							if( layers[i].getChildren().length == 0 ) {
+                              Layer layer = layers[i];
+                              members.add(new WMSGeoResourceImpl(this, layer));
+							}
                         }
                     }
             	}

Back to the top