[Commits] r2238 - sandbox/cmoullet/ux/GoogleEarthPanel/ux/widgets
commits at geoext.org
commits at geoext.org
Fri Jul 9 11:51:24 CEST 2010
Author: pgiraud
Date: 2010-07-09 11:51:24 +0200 (Fri, 09 Jul 2010)
New Revision: 2238
Modified:
sandbox/cmoullet/ux/GoogleEarthPanel/ux/widgets/GoogleEarthPanel.js
Log:
added a removeNetworkLink method
Modified: sandbox/cmoullet/ux/GoogleEarthPanel/ux/widgets/GoogleEarthPanel.js
===================================================================
--- sandbox/cmoullet/ux/GoogleEarthPanel/ux/widgets/GoogleEarthPanel.js 2010-07-05 12:06:24 UTC (rev 2237)
+++ sandbox/cmoullet/ux/GoogleEarthPanel/ux/widgets/GoogleEarthPanel.js 2010-07-09 09:51:24 UTC (rev 2238)
@@ -348,6 +348,8 @@
/** method[addNetwokLink]
* Add a network link to the google earth panel
+ * FIXME there's a typo in this method's name
+ * :param url: ``String`` the href of the kml to add
*/
addNetwokLink: function(url) {
var link = this.ge.createLink('');
@@ -358,6 +360,20 @@
this.ge.getFeatures().appendChild(networkLink);
},
+ /** method[removeNetworkLink]
+ * Remove a network link
+ * :param url: ``String`` the href of the kml to remove
+ */
+ removeNetworkLink: function(url) {
+ var links = this.ge.getFeatures().getChildNodes();
+ for (var i = 0; i < links.getLength(); i++) {
+ if (links.item(i).getLink().getHref() == url) {
+ this.ge.getFeatures().removeChild(links.item(i));
+ break;
+ }
+ }
+ },
+
/** method[addLayer]
* Add a WMS layer supporting KML output format
* :param layer: ``OpenLayers.Layer.WMS`` OpenLayers WMS layer
More information about the Commits
mailing list