Other plugins can not receive the touch event if map is displayed
MODIFY
src/ios/GoogleMaps/MyPluginLayer.m
src/ios/GoogleMaps/MyPluginLayer.m
@@ -294,25 +294,24 @@ BOOL hasCordovaStatusBar = NO; // YES if the app has cordova-plugin-statusbar
}
}
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
- if (self.isSuspended || self.pluginScrollView.debugView.mapCtrls == nil || self.pluginScrollView.debugView.mapCtrls.count == 0) {
- // Assumes all touches for the browser
- [self execJS:@"javascript:if(window.cordova){cordova.fireDocumentEvent('plugin_touch', {});}"];
-
- // fix issue with not being able to interact with any other view that might have been added
+ // Check other views of other plugins before this plugin
// e.g. PhoneGap-Plugin-ListPicker, etc
- for (UIView *subview in [self.webView.superview subviews])
- {
+ for (UIView *subview in [self.webView.superview subviews]) {
// we only want to check against other views
- if (subview == self.pluginScrollView || subview == self.webView)
+ if (subview == self.pluginScrollView || subview == self.webView) {
continue;
+ }
UIView *hit = [subview hitTest:point withEvent:event];
- if (hit)
+ if (hit) {
return hit;
}
+ }
- // fallback to webView
+ if (self.isSuspended || self.pluginScrollView.debugView.mapCtrls == nil || self.pluginScrollView.debugView.mapCtrls.count == 0) {
+ // Assumes all touches for the browser
+ [self execJS:@"javascript:if(window.cordova){cordova.fireDocumentEvent('plugin_touch', {});}"];
return [self.webView hitTest:point withEvent:event];
}

Other plugins can not receive the touch event if map is displayed