Skip to content

Commit fd95cb0

Browse files
paodbjavier-godoy
authored andcommitted
feat: remove all custom controls
1 parent 9ae9dc8 commit fd95cb0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMap.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,14 @@ public void removeCustomControl(CustomControl customControl) {
820820
this.setCustomControls(this.customControls.stream().toArray(CustomControl[]::new));
821821
}
822822

823+
/**
824+
* Removes all custom controls added to the map.
825+
*/
826+
public void removeCustomControls() {
827+
this.customControls.clear();
828+
this.getElement().executeJs("this._removeCustomControls()");
829+
}
830+
823831
/**
824832
* Adds a FullScreenEvent listener. The listener is called to notify whether the map is in full
825833
* screen mode.

0 commit comments

Comments
 (0)