Fix: the application uses ionic v1 can't interactive with map view on only iPhone5 because of resetCSS
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.4.1" 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.4.2-beta-20180828-1152" 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">
<runs/>

MODIFY
src/ios/GoogleMaps/MyPluginLayer.h
src/ios/GoogleMaps/MyPluginLayer.h
@property (nonatomic) BOOL isSuspended;
@property (nonatomic) NSOperationQueue *executeQueue;
@property (atomic, strong) NSObject *_lockObject;
+@property (atomic, strong) NSMutableDictionary *CACHE_FIND_DOM;
- (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.CACHE_FIND_DOM = [NSMutableDictionary dictionary];
self = [super initWithFrame:[webView frame]];
self.webView = webView;
CGPoint browserClickPoint = CGPointMake(point.x - self.webView.frame.origin.x, point.y - self.webView.frame.origin.y);
//NSLog(@"-->zoomScale = %f", self.webView.scrollView.zoomScale);
+ [self.CACHE_FIND_DOM removeAllObjects];
// Check other views of other plugins before this plugin
// e.g. PhoneGap-Plugin-ListPicker, etc
NSDictionary *domInfo;
@synchronized(self.pluginScrollView.HTMLNodes) {
+ //NSLog(@"--->browserClickPoint = %f, %f", browserClickPoint.x, browserClickPoint.y);
clickedDomId = [self findClickedDom:@"root" withPoint:browserClickPoint isMapChild:NO overflow:nil];
while(mapId = [mapIDs nextObject]) {
- (NSString *)findClickedDom:(NSString *)domId withPoint:(CGPoint)clickPoint isMapChild:(BOOL)isMapChild overflow:(OverflowCSS *)overflow {
+ if ([self.CACHE_FIND_DOM objectForKey:domId]) {
+ return [self.CACHE_FIND_DOM objectForKey:domId];
+ }
NSDictionary *domInfo = [self.pluginScrollView.HTMLNodes objectForKey:domId];
+ NSDictionary *domInfoChild;
NSArray *children = [domInfo objectForKey:@"children"];
NSString *maxDomId = nil;
CGRect rect;
rect = CGRectFromString([domInfo objectForKey:@"size"]);
right = rect.origin.x + rect.size.width;
bottom = rect.origin.y + rect.size.height;
- if (overflow != nil) {
+ if (overflow != nil && ![@"root" isEqualToString:domId ]) {
if (overflow.cropX) {
rect.origin.x = MAX(rect.origin.x, overflow.rect.origin.x);
right = MIN(right, overflow.rect.origin.x + overflow.rect.size.width);
}
grandChildId = [self findClickedDom:childId withPoint:clickPoint isMapChild: isMapChild overflow:overflow];
if (grandChildId == nil) {
- domInfo = [self.pluginScrollView.HTMLNodes objectForKey:grandChildId];
+ domInfoChild = [self.pluginScrollView.HTMLNodes objectForKey:grandChildId];
grandChildId = childId;
} else {
- domInfo = [self.pluginScrollView.HTMLNodes objectForKey:grandChildId];
+ domInfoChild = [self.pluginScrollView.HTMLNodes objectForKey:grandChildId];
zIndexProp = [domInfo objectForKey:@"zIndex"];
zIndexValue = [[zIndexProp objectForKey:@"z"] intValue];
}
- rect = CGRectFromString([domInfo objectForKey:@"size"]);
+ rect = CGRectFromString([domInfoChild objectForKey:@"size"]);
right = rect.origin.x + rect.size.width;
bottom = rect.origin.y + rect.size.height;
- if (overflow != nil) {
+ if (overflow != nil && ![@"root" isEqualToString:domId ]) {
if (overflow.cropX) {
rect.origin.x = MAX(rect.origin.x, overflow.rect.origin.x);
right = MIN(right, overflow.rect.origin.x + overflow.rect.size.width);
}
}
- if (maxDomId == nil) {
+ if (maxDomId == nil && ![@"root" isEqualToString:domId]) {
if ([@"none" isEqualToString:pointerEvents]) {
+ [self.CACHE_FIND_DOM setValue:nil forKey:domId];
return nil;
}
domInfo = [self.pluginScrollView.HTMLNodes objectForKey:domId];
clickPoint.y < rect.origin.y ||
clickPoint.x > right ||
clickPoint.y > bottom) {
+ [self.CACHE_FIND_DOM setValue:nil forKey:domId];
return nil;
}
maxDomId = domId;
}
+ [self.CACHE_FIND_DOM setValue:maxDomId forKey:domId];
return maxDomId;
}

Fix: the application uses ionic v1 can't interactive with map view on only iPhone5 because of resetCSS #2402