delete property values when overlay is removed
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.3.12-ext-20180818-0125" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
+<plugin id="cordova-plugin-googlemaps" version="2.3.12-ext-20180818-1158" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>cordova-plugin-googlemaps</name>
<js-module name="BaseClass" src="www/BaseClass.js">
<runs/>

MODIFY
src/browser/PluginCircle.js
src/browser/PluginCircle.js
@@ -179,6 +179,7 @@ PluginCircle.prototype.remove = function(onSuccess, onError, args) {
circle = undefined;
self.pluginMap.objects[overlayId] = undefined;
delete self.pluginMap.objects[overlayId];
+ delete self.pluginMap.objects['circle_property_' + overlayId];
}
onSuccess();
};

MODIFY
src/browser/PluginGroundOverlay.js
src/browser/PluginGroundOverlay.js
@@ -94,13 +94,14 @@ PluginGroundOverlay.prototype._createOverlay = function(map, groundoverlayId, pl
PluginGroundOverlay.prototype.remove = function(onSuccess, onError, args) {
var self = this;
var overlayId = args[0];
- var groundoverlay = self.pluginMap.objects[overlayId];
- if (groundoverlay) {
- google.maps.event.clearInstanceListeners(groundoverlay);
- groundoverlay.setMap(null);
- groundoverlay = undefined;
+ var groundOverlay = self.pluginMap.objects[overlayId];
+ if (groundOverlay) {
+ google.maps.event.clearInstanceListeners(groundOverlay);
+ groundOverlay.setMap(null);
+ groundOverlay = undefined;
self.pluginMap.objects[overlayId] = undefined;
delete self.pluginMap.objects[overlayId];
+ delete self.pluginMap.objects['groundoverlay_property_' + overlayId];
}
onSuccess();
};

MODIFY
src/browser/PluginMarker.js
src/browser/PluginMarker.js
@@ -267,6 +267,7 @@ PluginMarker.prototype.remove = function(onSuccess, onError, args) {
marker = undefined;
self.pluginMap.objects[overlayId] = undefined;
delete self.pluginMap.objects[overlayId];
+ delete self.pluginMap.objects['marker_property_' + overlayId];
}
onSuccess();
};

MODIFY
src/browser/PluginPolygon.js
src/browser/PluginPolygon.js
@@ -119,6 +119,7 @@ PluginPolygon.prototype.remove = function(onSuccess, onError, args) {
polygon = undefined;
self.pluginMap.objects[overlayId] = undefined;
delete self.pluginMap.objects[overlayId];
+ delete self.pluginMap.objects['polygon_property_' + overlayId];
}
onSuccess();
};

MODIFY
src/browser/PluginPolyline.js
src/browser/PluginPolyline.js
@@ -75,6 +75,7 @@ PluginPolyline.prototype.remove = function(onSuccess, onError, args) {
polyline = undefined;
self.pluginMap.objects[overlayId] = undefined;
delete self.pluginMap.objects[overlayId];
+ delete self.pluginMap.objects['polyline_property_' + overlayId];
}
onSuccess();
};

MODIFY
src/browser/PluginTileOverlay.js
src/browser/PluginTileOverlay.js
@@ -131,6 +131,7 @@ PluginTileOverlay.prototype.remove = function(onSuccess, onError, args) {
tileoverlay = undefined;
self.pluginMap.objects[overlayId] = undefined;
delete self.pluginMap.objects[overlayId];
+ delete self.pluginMap.objects['tileoverlay_property_' + overlayId];
}
onSuccess();
};

delete property values when overlay is removed