Fixed: touch problem with cordova-plugin-statusbar
MODIFY
README.md
README.md
@@ -69,6 +69,7 @@ $> cordova plugin add cordova-plugin-googlemaps \
- Bug fix: can not click html element when you device is rotated.
- Add: Use `android-support-library-v4`
- Fix: `cordova-plugin-gooelmaps.CordovaGoogleMaps is already defined warning` message.
+ - Update: `com.googlemaps.ios@2.6.0` is required. Please reinstall the plugin.
---

MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.2.4-beta-20180208-2347" 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.4-beta-20180209-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/ios/GoogleMaps/MyPluginLayer.h
src/ios/GoogleMaps/MyPluginLayer.h
@property (nonatomic) BOOL stopFlag;
@property (nonatomic) NSOperationQueue *executeQueue;
@property (nonatomic) dispatch_semaphore_t semaphore;
+@property (atomic, strong) NSObject *_lockObject;
- (id)initWithWebView:(UIView *)webView;
- (void)resizeTask:(NSTimer *)timer;

MODIFY
src/ios/GoogleMaps/MyPluginLayer.m
src/ios/GoogleMaps/MyPluginLayer.m
- (id)initWithWebView:(UIView *)webView {
self.executeQueue = [NSOperationQueue new];
+ self._lockObject = [[NSObject alloc] init];
self = [super initWithFrame:[webView frame]];
self.webView = webView;
NSMutableDictionary *domInfo, *size;
NSString *domId;
- @synchronized(self.pluginScrollView.debugView.HTMLNodes) {
+ @synchronized(self._lockObject) {
+ if (self.pluginScrollView.debugView.HTMLNodes != nil) {
NSArray *keys=[self.pluginScrollView.debugView.HTMLNodes allKeys];
NSArray *keys2;
int i, j;
}
[self.pluginScrollView.debugView.HTMLNodes removeObjectForKey:domId];
}
+ }
self.pluginScrollView.debugView.HTMLNodes = nil;
NSMutableDictionary *newBuffer = [[NSMutableDictionary alloc] init];
}
}
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
- CGPoint point2 = CGPointMake(point.x - self.webView.frame.origin.x, point.y - self.webView.frame.origin.y);
+ CGPoint browserClickPoint = CGPointMake(point.x - self.webView.frame.origin.x, point.y - self.webView.frame.origin.y);
//NSLog(@"-->zoomScale = %f", self.webView.scrollView.zoomScale);
if (self.pluginScrollView.debugView.mapCtrls == nil || self.pluginScrollView.debugView.mapCtrls.count == 0) {
// Assumes all touches for the browser
//NSLog(@"--->browser!");
- return [self.webView hitTest:point2 withEvent:event];
+ return [self.webView hitTest:browserClickPoint withEvent:event];
}
float offsetX = self.webView.scrollView.contentOffset.x;
}
// Is the clicked point is in the map rectangle?
- if (CGRectContainsPoint(rect, point2)) {
+ if (CGRectContainsPoint(rect, browserClickPoint)) {
//NSLog(@"--->in map");
- clickedDomId = [self findClickedDom:@"root" withPoint:point isMapChild:NO overflow:nil];
- //point2 = CGPointMake(point.x - mapCtrl.view.frame.origin.x - self.webView.frame.origin.x, point.y - mapCtrl.view.frame.origin.y - self.webView.frame.origin.y);
+ clickedDomId = [self findClickedDom:@"root" withPoint:browserClickPoint isMapChild:NO overflow:nil];
//NSLog(@"--->clickedDomId = %@", clickedDomId);
if ([mapCtrl.mapDivId isEqualToString:clickedDomId]) {
// If user click on the map, return the mapCtrl.view.
+ CGPoint mapPoint = CGPointMake(point.x - mapCtrl.view.frame.origin.x - self.webView.frame.origin.x, point.y - mapCtrl.view.frame.origin.y - self.webView.frame.origin.y);
- UIView *hitView =[mapCtrl.view hitTest:point2 withEvent:event];
+ UIView *hitView =[mapCtrl.view hitTest:mapPoint withEvent:event];
//[mapCtrl mapView:mapCtrl.map didTapAtPoint:point2];
return hitView;
} else {
//NSLog(@"--->in browser!");
- return [self.webView hitTest:point2 withEvent:event];
+ return [self.webView hitTest:browserClickPoint withEvent:event];
}
}
}
//NSLog(@"--->in browser!");
- UIView *hitView =[self.webView hitTest:point2 withEvent:event];
+ UIView *hitView =[self.webView hitTest:browserClickPoint withEvent:event];
//NSLog(@"--> (hit test) hit = %@", hitView.class);
return hitView;

Fixed: touch problem with cordova-plugin-statusbar #2055