Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add clear method to the control.

  • Loading branch information...
commit f6ff279f1fc444464bcf291b878ae983cf566a48 1 parent dd6e03d
@jorix authored
Showing with 15 additions and 2 deletions.
  1. +15 −2 lib/FeaturePopups.js
View
17 lib/FeaturePopups.js
@@ -648,6 +648,19 @@ OpenLayers.Control.FeaturePopups = OpenLayers.Class(OpenLayers.Control, {
},
/**
+ * APIMethod: clear
+ * Clear selecction and popups.
+ */
+ clear: function() {
+ for (var layerId in this.layerObjs) {
+ this.layerObjs[layerId].clear();
+ }
+ for (var key in this.popupObjs) {
+ this.popupObjs[key].clearPopup();
+ }
+ },
+
+ /**
* APIMethod: addLayer
* Add the layer to control and assigns it the templates, see options.
*
@@ -1397,8 +1410,8 @@ OpenLayers.Control.FeaturePopups.Popup = OpenLayers.Class({
},
/**
- * Method: clear
- * Internal use only.
+ * APIMethod: clear
+ * Clear the popup and related popups.
*/
clear: function() {
this.clearPopup();
Please sign in to comment.
Something went wrong with that request. Please try again.