[Commits] r2143 - in sandbox/bartvde/playground/geoext: examples lib/GeoExt/widgets/tree
commits at geoext.org
commits at geoext.org
Thu Apr 29 13:05:51 CEST 2010
Author: bartvde
Date: 2010-04-29 13:05:51 +0200 (Thu, 29 Apr 2010)
New Revision: 2143
Modified:
sandbox/bartvde/playground/geoext/examples/wms-tree.js
sandbox/bartvde/playground/geoext/lib/GeoExt/widgets/tree/WMSLoader.js
Log:
explicitly return null
Modified: sandbox/bartvde/playground/geoext/examples/wms-tree.js
===================================================================
--- sandbox/bartvde/playground/geoext/examples/wms-tree.js 2010-04-29 11:02:40 UTC (rev 2142)
+++ sandbox/bartvde/playground/geoext/examples/wms-tree.js 2010-04-29 11:05:51 UTC (rev 2143)
@@ -13,7 +13,7 @@
}),
listeners: {
'click': function(node) {
- if (node.attributes.layer !== undefined) {
+ if (node.attributes.layer !== null) {
mapPanel.map.addLayer(node.attributes.layer);
}
}
Modified: sandbox/bartvde/playground/geoext/lib/GeoExt/widgets/tree/WMSLoader.js
===================================================================
--- sandbox/bartvde/playground/geoext/lib/GeoExt/widgets/tree/WMSLoader.js 2010-04-29 11:02:40 UTC (rev 2142)
+++ sandbox/bartvde/playground/geoext/lib/GeoExt/widgets/tree/WMSLoader.js 2010-04-29 11:05:51 UTC (rev 2143)
@@ -80,6 +80,8 @@
* :param layer: ``Object`` The layer object from the WMS GetCapabilities
* parser
* :param url: ``String`` The online resource of the WMS
+ * :return: ``OpenLayers.Layer.WMS`` or ``null`` The WMS layer created or
+ * null.
*
* Create a WMS layer which will be attached as an attribute to the
* node.
@@ -93,6 +95,8 @@
queryable: layer.queryable, maxScale: layer.maxScale,
metadata: layer
}, this.layerOptions));
+ } else {
+ return null;
}
},
More information about the Commits
mailing list