Bug fix: markercluster.remove() does not work on browser platform
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.5.0-beta-20181030-1133" 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.5.0-beta-20181219-2107" 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="Promise" src="www/Promise.js" />
<asset src="www/promise-7.0.4.min.js.map" target="promise-7.0.4.min.js.map" />

MODIFY
src/browser/PluginMarkerCluster.js
src/browser/PluginMarkerCluster.js
@@ -422,6 +422,9 @@ PluginMarkerCluster.prototype.remove = function(onSuccess, onError, args) {
keys.forEach(function(key) {
if (key.indexOf(clusterId) === 0) {
+ if (self.pluginMap.objects[key]) {
+ self.pluginMap.objects[key].setMap(null);
+ }
self.pluginMarkers[key] = STATUS.DELETED;
delete self.pluginMap.objects[key];
delete self.pluginMap.objects['marker_property_' + key];
@@ -430,6 +433,7 @@ PluginMarkerCluster.prototype.remove = function(onSuccess, onError, args) {
onSuccess();
};
+
PluginMarkerCluster.prototype.onClusterEvent = function(evtName, marker) {
var self = this,
mapId = self.pluginMap.__pgmId;

Bug fix: markercluster.remove() does not work on browser platform #2504