Prevent generating multiple timer instance
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.2.8-beta-20180314-2258" 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.2.8-beta-20180314-2331" 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/CordovaGoogleMaps.m
src/ios/GoogleMaps/CordovaGoogleMaps.m
- (void)getMap:(CDVInvokedUrlCommand *)command {
if (self.pluginLayer != nil) {
self.pluginLayer.isSuspended = false;
+ [self.pluginLayer startRedrawTimer];
}
/*---------------------------------------------------------------------------------------

MODIFY
src/ios/GoogleMaps/MyPluginLayer.m
src/ios/GoogleMaps/MyPluginLayer.m
}
- (void)startRedrawTimer {
+ @synchronized(self._lockObject) {
if (!self.redrawTimer) {
self.redrawTimer = [NSTimer scheduledTimerWithTimeInterval:0.1
repeats:YES];
}
}
+}
- (void)stopRedrawTimer {
+ @synchronized(self._lockObject) {
if (self.redrawTimer) {
[self.redrawTimer invalidate];
self.redrawTimer = nil;
}
}
+}
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{
CGPoint offset = self.webView.scrollView.contentOffset;
- (void)resizeTask:(NSTimer *)timer {
if (self.isSuspended || self.stopFlag) {
+ NSLog(@"---->suspend");
+ //[self stopRedrawTimer];
return;
}
self.stopFlag = YES;

Prevent generating multiple timer instance