Update PluginPolygon.java
Revert if condition. Setting dynamic polygon visibility by function
MODIFY
src/android/plugin/google/maps/PluginPolygon.java
src/android/plugin/google/maps/PluginPolygon.java
@@ -339,6 +339,11 @@ public class PluginPolygon extends MyPlugin implements MyPluginInterface {
public void run() {
// Update the polygon
polygon.setPoints(path);
+ if (path.size() > 0) {
+ polygon.setVisible(polygon.isVisible());
+ } else {
+ polygon.setVisible(false);
+ }
callbackContext.success();
}
});

Update PluginPolygon.java

Revert if condition. Setting dynamic polygon visibility by function