Add: markercluster.remove() method for ios
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="cluster-20170818-2345" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
+<plugin id="cordova-plugin-googlemaps" version="cluster-20170819-1930" 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/ios/GoogleMaps/PluginMarkerCluster.h
src/ios/GoogleMaps/PluginMarkerCluster.h
@property (atomic, strong) dispatch_semaphore_t semaphore;
@property (atomic, strong) dispatch_semaphore_t deleteThreadLock;
@property (nonatomic) BOOL stopFlag;
-@property (nonatomic) BOOL initialized;
- (void)create:(CDVInvokedUrlCommand*)command;
- (void)redrawClusters:(CDVInvokedUrlCommand*)command;
+- (void)remove:(CDVInvokedUrlCommand*)command;
@end

MODIFY
src/ios/GoogleMaps/PluginMarkerCluster.m
src/ios/GoogleMaps/PluginMarkerCluster.m
@@ -94,6 +94,32 @@ const int GEOCELL_GRID_SIZE = 4;
}
+- (void)remove:(CDVInvokedUrlCommand*)command {
+
+ NSString *clusterId = [command.arguments objectAtIndex: 0];
+ @synchronized (self.debugFlags) {
+ [self.debugFlags removeObjectForKey:clusterId];
+ [self.waitCntManager removeObjectForKey:clusterId];
+ }
+
+ @synchronized (self.pluginMarkers) {
+ NSString *key;
+ NSArray *keys = self.pluginMarkers.allKeys;
+ for (int i = 0; i < keys.count; i++) {
+ key = [keys objectAtIndex:i];
+ if ([key hasPrefix:clusterId]) {
+ [self.pluginMarkers setObject:@"DELETED" forKey:key];
+ [self.deleteMarkers addObject:key];
+ }
+ }
+ }
+ dispatch_semaphore_signal(self.deleteThreadLock);
+
+
+ CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK ];
+ [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
+
+}
- (void)create:(CDVInvokedUrlCommand*)command {
NSDictionary *params = [command.arguments objectAtIndex:1];
NSArray *positionList = [params objectForKey:@"positionList"];

Add: markercluster.remove() method for ios