diff --git a/README.md b/README.md index a0777d6b9..8ab022f35 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cordova GoogleMaps plugin for Android, iOS and Browser v2.5.2 +# Cordova GoogleMaps plugin for Android, iOS and Browser v2.5.3 | Download | Build test (master branch)| |----------|---------------------------| @@ -197,6 +197,10 @@ --------------------------------------------------------------------------------------------------------- ## Release Notes + - **v2.5.3** + - Fix: (iOS) touch problem + - Fix: (iOS) `toDataURL()` bug + - **v2.5.2** - Fix: (Android/iOS/Browser) MarkerCluster.remove() causes null pointer error. - Fix: (iOS) touch problem diff --git a/package.json b/package.json index dca390716..ca9d35c8f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-googlemaps", - "version": "2.5.2", + "version": "2.5.3", "description": "Google Maps native SDK for Android and iOS, and Google Maps JavaScript API v3 for browser.", "cordova": { "id": "cordova-plugin-googlemaps", diff --git a/plugin.xml b/plugin.xml index 970f9357d..4ebde52b7 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,5 +1,5 @@ - + cordova-plugin-googlemaps diff --git a/src/browser/PluginGeocoder.js b/src/browser/PluginGeocoder.js index db8e835c7..23b768c91 100644 --- a/src/browser/PluginGeocoder.js +++ b/src/browser/PluginGeocoder.js @@ -110,9 +110,6 @@ QUEUE.on('next', function() { if (!result.postalCode && addrComp.types.indexOf('postal_code') > -1) { result.postalCode = addrComp.long_name; } - if (!result.postalCode && addrComp.types.indexOf('postal_code') > -1) { - result.postalCode = addrComp.long_name; - } if (!result.thoroughfare && addrComp.types.indexOf('street_address') > -1) { result.thoroughfare = addrComp.long_name; } diff --git a/src/ios/GoogleMaps/MyPluginLayer.m b/src/ios/GoogleMaps/MyPluginLayer.m index e50109469..4bca5142a 100644 --- a/src/ios/GoogleMaps/MyPluginLayer.m +++ b/src/ios/GoogleMaps/MyPluginLayer.m @@ -55,7 +55,10 @@ - (id)initWithWebView:(UIView *)webView { [self.pluginScrollView setContentSize:self.webView.scrollView.frame.size ]; [self addSubview:self.pluginScrollView]; + [self addSubview:self.webView]; + + // dispatch_queue_t q_background = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0); // // dispatch_async(q_background, ^{ @@ -344,7 +347,7 @@ - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { NSArray *subviews = [self.webView.superview subviews]; //CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame; //CGPoint subviewPoint = CGPointMake(browserClickPoint.x, browserClickPoint.y - statusBarFrame.size.height); - CGPoint subviewPoint = CGPointMake(browserClickPoint.x, browserClickPoint.y ); + CGPoint subviewPoint = CGPointMake(browserClickPoint.x, browserClickPoint.y + self.webView.frame.origin.y); for (int i = ((int)[subviews count] - 1); i >= 0; i--) { subview = [subviews objectAtIndex: i]; //NSLog(@"--->subview[%d] = %@", i, subview); diff --git a/src/ios/GoogleMaps/PluginMap.m b/src/ios/GoogleMaps/PluginMap.m index 1e2f33feb..a6ef96d4f 100644 --- a/src/ios/GoogleMaps/PluginMap.m +++ b/src/ios/GoogleMaps/PluginMap.m @@ -693,8 +693,9 @@ - (void)toDataURL:(CDVInvokedUrlCommand *)command { [self.mapCtrl.executeQueue addOperationWithBlock:^{ NSData *imageData = UIImagePNGRepresentation(image); NSString* base64Encoded = [imageData base64EncodedStringWithOptions:0]; - - CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:base64Encoded]; + NSString* base64EncodedWithData = [@"data:image/png;base64," stringByAppendingString:base64Encoded]; + + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:base64EncodedWithData]; [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; }]; }];