diff --git a/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMap.java b/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMap.java index 0311065..07c13f6 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMap.java +++ b/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMap.java @@ -787,6 +787,7 @@ public void addCustomControls(CustomControl... customControls) { * @param customControls list of custom controls to add to the map */ public void setCustomControls(CustomControl... customControls) { + this.customControls.clear(); this.getElement().executeJs("this._removeCustomControls()").then((e) -> { JsonArray jsonArray = Json.createArray(); for (int i = 0; i < customControls.length; i++) {